【C#】XSLT转换XML实例
产品几年前使用ASP,后来升级到.Net 1.1,再升级到2.0,一直都有用XSLT转换XML生成网页的方式,稍微整理下。
XML file:
<?xml version="1.0" encoding="utf-8" ?>
<ric>
<catalog>
<book price="75">
<author>Kalen Delaney</author>
<name>Inside SQL Server 2000</name>
</book>
<book price="200">
<author>Ken Henderson</author>
<name>The Guru's Guide to SQL Server Architecture</name>
</book>
</catalog>
</ric>
XSLT file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">
<html>
<body>
<table cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse;font-size:14px;">
<tr>
<th>Book Name</th>
<th>Author</th>
<th>Price</th>
</tr>
&nb
相关文档:
Asynchronous JavaScript + XML(Ajax)无疑是 2006 年最热门的技术术语,且有望在
2007 得到进一步发展。但是对您的应用程序来说它究竟有什么意义呢?Ajax 应用程序中哪一种常见架构模式应用最广泛呢?本文将介绍五种常见
Ajax 设计模式,可以使用它们作为工作的基础。
的确,Ajax
是 Web 2.0
热门术语,所有人都希望 ......
写Unmanaged Code在.NET时代成为一种很悲惨的事,当你需要处理XML文件时,这种感觉会变得尤其强烈。FCL中的System.XML多简单啊,连Steve Ballmer都知道怎么用。
事情不会总是那么理想的,假如你要在C/C++程序里处理XML怎么办呢?
选择一:市面上的XML lib还是有几个的,最有名的当然是libXML。我一年前用过,很不错,我还 ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
public class Enc ......