<?xml version="1.0" encoding="GB2312" ?>
<result code="1">
<content opname="extendPay">
<message>提交成功 </message>
<validtime>2009-5-12 </validtime>
</content>
</result>
請教ASP本地程序如何遠(yuǎn)程讀取上述xml文件信息:
1.code的值
2.message的值
3.validtime的值
<%
Set xmlServerHttp = CreateObject("Msxml2.ServerXMLHTTP")
xmlServerHttp.open "GET", "http://localhost:90/test.asp", False
xmlServerHttp.send
Set oDoc = xmlServerHttp.responseXML
response.write oDoc.xml
code = oDoc.documentElement.getAttribute("code")
response.write code
message = oDoc.selectSingleNode("//message").text
response.write message
validtime = oDoc.selectSingleNode("//validtime").text
response.write validtime
%>