快速從一個XML文件中查找信息(3)_Xml教程
推薦:Web 2.0 編程思想:16條法則 1、在你開始之前,先定一個簡單的目標(biāo)。 無論你是一個Web 2.0應(yīng)用的創(chuàng)建者還是用戶,請清晰的構(gòu)思你的目標(biāo)。就像“我需要保存一個書簽”或者“我準(zhǔn)備幫助人們創(chuàng)建可編輯的、共享的
如:
order.xml
<!--Represents a customer order-->
<order>
<book ISBN='10-861003-324'>
<title>The Handmaid's Tale</title>
<price>19.95</price>
</book>
<cd ISBN='2-3631-4'>
<title>Americana</title>
<price>16.95</price>
</cd>
</order>
和:books.xml
<?xml version="1.0"?>
<!-- This file represents a fragment of a book store inventory database -->
<bookstore>
<book cc="dd" xmlns:bk="urn:sample" xmlns:ns="http://www.Any.com" genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<ns:author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</ns:author>
<price>8.99</price>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">
<title>The Gorgias</title>
<author>
<name>Plato</name>
</author>
<price>9.99</price>
</book>
</bookstore>
我們可以對該XML文件中的price求和,以得到價格總數(shù)。
分享:XSL基礎(chǔ)教程第三章客戶端XSL 如果瀏覽器支持XML,,就可以用XSL在瀏覽器中將文檔轉(zhuǎn)換成HTML。 一個JavaScript的解決方法 在前文中,我們解釋了如何用XSL將一個文檔從XML轉(zhuǎn)換成HTML。竅門就是向XML文件中增加
- xml創(chuàng)建節(jié)點(根節(jié)點、子節(jié)點)
- WML開發(fā)教程之 WAP網(wǎng)站服務(wù)器配置方法
- WMLScript的語法基礎(chǔ)
- 收集的WML Script標(biāo)準(zhǔn)函數(shù)庫
- WML教程之文本框控件Input
- 無線標(biāo)記語言(WML)基礎(chǔ)之WMLScript 基礎(chǔ)
- xml文件的結(jié)構(gòu)解讀
- 關(guān)于XSL - XSL教程
- 選擇模式 - XSL教程 - 2
- XPath入門 - XSL教程 - 3
- 匹配模式 - XSL教程 - 4
- 測試模式 - XSL教程 - 5
- 相關(guān)鏈接:
- 教程說明:
Xml教程-快速從一個XML文件中查找信息(3)
。