XML ÓëXSLת»»Ê§°Ü£¬´óϺ°ïÖú£¡
ÎÒµÄXMLÎĵµÊÇ£º
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="employees.xsl"?>
<employees>
<employee>
<name>zhangsan </name>
<age>21 </age>
<monthly_pay>5000 </monthly_pay>
</employee>
<employee>
<name>lisi </name>
<age>22 </age>
<monthly_pay>6000 </monthly_pay>
</employee>
<employee>
<name>wangwu </name>
<age>23 </age>
<monthly_pay>7000 </monthly_pay>
</employee>
</employees>
ÎÒµÄXSLÎĵµÊÇ:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3c.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Ö°Ô±ÐÅÏ¢±í </title>
&nb
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
ÎÒÏÖÔÚ×ö½Ó¿Úµ¼³ö£¬.NETƽ̨£¬¿ª·¢ÓïÑÔC#£¬Ïëµ¼³öXMLµÄÎı¾¸ñʽ¡£
ÏëµÃµ½ <?xml version="1.0" encoding="GBK"?>
µÄ±àÂë¸ñʽ£¡ÔõôÉèÖã¿Ð»Ð»£¡¼±£¡
¶¥
Ö»Òª±£´æΪxml¸ñʽ£¬ ......
²ÉÓÃDOM ½øÐнâÎöxml¡£ÒªÇó½«xml×Ö´®²åÈëÖ¸¶¨½Úµã×÷ΪÆä×Ó½Úµã
±ÈÈ磺
Ôxml
<root>
</root>
Òª²åÈëµÄxml×Ö´®
<a>test</a>
Ä¿µÄxml£º
<root>
<a> ......
ÔÚSqlserverÊý¾Ý¿âNorthwindsÖд´½¨Ò»¸ö´æ´¢¹ý³Ì£¬
¸Ã´æ´¢¹ý³ÌÓÐÁ½¸ö²ÎÊý£¬nvarchar(5)ÀàÐ͵Ä@customerID ÊÇcustomers±íµÄcustomerID£¬ xmlÀàÐ͵IJÎÊý@xmlCustOrderÊÇÊä³ö²ÎÊý£¬´æ´¢¹ý³Ì½«¸ù¾ÝordersºÍcustomers ±í ......