【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)有正确的方法,也有错误的方法。本文将讨论一些需要避免的常见编码实践。
如果人们在第一次就能够将所有事情全部做对,那么这个世界将变得完全不同。Ajax 也是如此。我做了大量的工作以支持 Ajax
......
当页面载入时,会执行位于 body 部分的 JavaScript。
当被调用时,位于 head 部分的 JavaScript 才会被执行。
2006年1月14日,John Resig 在BarCampNYC上第一次发布了jQuery。
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。易于人阅读和编写。同时也易于机器解析和生成。它基于JavaScript(St ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
public class Enc ......
protected void Page_Load(object sender, EventArgs e)
{
lblValue.Text = string.Format("{0:N}", 2500000);
lblValue.Text = string.Format("{0:C3}", 2);
......