如何用ASP读取 XML - Web 开发 / ASP
<?xml version="1.0"?>
<root>
<status>433</status>
<msg>这个是汉字</msg>
<serialno>123</serialno>
</root>
如何用ASP读取 status值 msg值 serialno值
LZ要学会用搜索引擎
http://topic.csdn.net/u/20090626/19/67DD3047-1F86-4291-B8EF-62D6782D52F1.html
用MSXML!给你小示例:
VBScript code:
strPath=Server.MapPath("/template/infotag.xml")
Set parser=Server.CreateObject("Microsoft.XMLDOM")
parser.Load(strPath)
If parser.parseError.errorCode<>0 then
Response.Write "load error..."
End If
Set itemList=parser.selectNodes("//item[@parent='0']")
Dim floatCursor:floatCursor=35
Dim maxindex:maxindex=itemList.length
Response.Write "<div class='item'>"
For I=0 to maxindex-1
Dim strTitle,strID
strTitle=itemList.item(i).firstChild.nodeValue
strID=itemList.item(i).getAttribute("id")
Set childNodes=parser.selectNodes("//item[@parent='"&strID&"']")
If childNodes.length-1>floa
相关问答:
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
''' <summary>
'' ......
本人目前遇到一个难题,请各位高手、大侠帮帮忙。
我单击一个按钮时要把gridview中的数据一个一个的取出并把对应参数传递给前台的js。
我试了几种后台调前台的方式都没有成功,所以请大侠们帮帮小弟。
谢谢。
不 ......
在asp里怎么调用java写的webservice方法,有很多方法
- <message name="RtPnrIn">
<part name="bstrPnrNO" type="s:string" />
<part name ......
本人不会asp,报错了,请大家帮忙看看。
代码如下:
<%
dim keyword_Name,keyword_YJ,keyword_RQ
if rs("QS_PASS_1_name")<>"0,0" then
keyword_Name=split(rs("QS_ ......
如何对xml内容数据进行比较
例如:
<?xml version='1.0' encoding='utf-8'?>
<TestLIST>
<PID>40</PID>
<TestName>深圳市</TestName>
......