寫XML文件
<?xml version="1.0"?> 定義標記
<book>
<title>XML</title>
<author>lisongtao</author>
</book>
主要是注意語法的套用
============================
用CSS來顯示XML:
1.XML
--------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="1.css"?> ''連接CSS樣式表
<lisongtao>
Hello the world!
</lisongtao>
---------------------------------------------
1.CSS
----------------------------------------
lisongtao {display: block; font-size: 48pt; font-weight: bold;}
=====================================================
用XLS來顯示XML:
1.XML
--------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="2.xls"?> ''''連接XLS
<lisongtao>
Hello the world!
</lisongtao>
---------------------------------------------
2.xsL
----------------------------------------
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> ''定議模板開始
<xsl:template match="/"> ''根標記
<html>
<head>
<title>hello the world</title>
</head>
<body bgcolor="#CCCCFF">
<h1 align="center"><xsl:value-of select="lisongtao"/></h1>''子節點
</body>
</html>
</xsl:template>
</xsl:stylesheet>
======================================================
XML 的注釋和JS一樣.
<?xml version="1.0"?>
<books height="6'5'">
<book width="6"5"">
<name>list &lisongtao</name>
<author>lisongtao < list@263.net></author>
</book>
</books>
========================================
<![CDATA[
<book>
<name>xml应用</name>
<author>list1</author>
<price>55.00</price>
</book>
]]>
<book>
<name>xml应用</name>
<author>list1</author>
<price>55.00</price>
</book>
</books>
================================================
经过以上的学习.总算写出一个标准的XML文件
</lessons>
<teachers>
<teacher id="1122" lesson_id="11">
<name>江华</name>
<age>33</age>
<tea_age>3</tea_age>
<rank>教授</rank>
<publish>控制原理</publish>
<sex>男</sex>
</teacher>
<teacher id="1123" lesson_id="12">
<name>刘佳</name>
<age>40</age>
<tea_age>7</tea_age>
<rank>副教授</rank>
<publish>网络原理</publish>
<sex>男</sex>
</teacher>
</teachers>
</choose_system>