利用XSL和ASP在線編輯XML文檔(3)_Xml教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:簡單的XML操作:XML文件創(chuàng)建簡單的XML操作:XML文件創(chuàng)建 把下面的代碼復(fù)制到按鈕事件中編譯執(zhí)行后可在相應(yīng)物理路徑中產(chǎn)生Pos.xml文件 以下為引用的內(nèi)容: XmlTextWriter xtw = ne
當(dāng)表單提交成功后,我們用updateduserdata.xsl來顯示我們剛剛編輯的數(shù)據(jù)。updateduserdata.xsl如下:
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<body>
<h1>更新后的用戶資料如下:</h1>
<table border="1" cellpadding="2">
<xsl:for-each select="用戶資料/field">
<tr>
<td>
<xsl:value-of select="@id" />
</td>
<td>
<xsl:value-of select="field_value" />
</td>
</tr>
</xsl:for-each>
</table>
<form>
<input type="button" value="返回" onclick="history.go(-1)" />
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
以上只是XML跨平臺應(yīng)用的一個簡單的例子,結(jié)合具體的需求,我們可以編寫功能更強大的程序來完成我們更負雜的工作。所有程序在WIN98SE PWS IE5.5 Netscape 4.75 Netscape 6 MSXML3.DLL環(huán)境下調(diào)試通過。
分享:獲取mssql的xml返回結(jié)構(gòu)的方法數(shù)據(jù)庫在時回加for xml auto 調(diào)用方法 SqlCommand SqlComm= new SqlCommand("Psp_ShowMarkerProduct",Db.SqlConn); XmlReader Xr= SqlComm.ExecuteXmlReader();
相關(guān)Xml教程:
- 相關(guān)鏈接:
- 教程說明:
Xml教程-利用XSL和ASP在線編輯XML文檔(3)
。