XSLTת»»XMLʵÀý
ת×Ô½±ß¹ÂÄñ: http://blog.csdn.net/jbgh608/archive/2007/08/31/1767414.aspx
W3school µÄxsl½Ì³Ì£º http://www.w3school.com.cn/xsl/index.asp
²úÆ·¼¸ÄêǰʹÓÃ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>
&l
Ïà¹ØÎĵµ£º
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//µ¼ÈëʹÓÃxmlÓ¦ÓÃËùÐèµ ......
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
&nb ......
1.
ÓÃXML½áµãµÄÊôÐÔÖµ²éÕÒÏàͬ½áµãµÄÆäËüÊôÐÔÖµ[C#]
ʵÏÖ¹¦ÄÜ:
ÓÃXML½áµãµÄÊôÐÔÖµ²éÕÒÏàͬ½áµãµÄÆäËüÊôÐÔÖµ,¼´ÈçϵÄxml,ÊäÈëÒ»¸ö001,ÄܵóöFistTag_ValueÕâ¸öÖµÀ´.
1)Ê×ÏÈ,°ÑÏÂÃæµÄxmlÎĵµ´æÔÚDÅÌĿ¼ÏÂ,ÃüÃûΪ:Test.xml,xmlÎĵµÄÚÈÝÈçÏÂ
//-------------------------------------xmlÎĵµ·Ö¸îÏß- ......