复制代码 代码如下:<%
dimobjXML
dimobjRootElement
dimstrValue
dimstrInetURL
dimstrXML
dimitem
strInetURL="http://pf.inetsolution.com/inetactive2001/inetactive2001news.xml"
DimHttpReq
setHttpReq=server.CreateObject("MSXML2.XMLHTTP")
HttpReq.open"GET","http://pf.inetsolution.com/inetactive2001/inetactive2001news.xml",False
HttpReq.send
strXML=HttpReq.responseText
SetobjXML=Server.CreateObject("Msxml2.DOMDocument")
objXML.validateonparse=true
objXML.async=false
objXML.loadXML(strXML)
ifobjXML.ParseError.errorCode<>0then
Response.Write("Error:"&objXML.parseError.reason&"<br>")
Response.Write("Code:0x"&hex(objXML.parseError.errorCode)&"<br>")
Response.Write("AtLine:"&objXML.parseError.line&"<br>")
Response.Write("Atpos:"&objXML.parseError.linePos&"<br>")
else
setobjRootElement=objXML.documentElement
ifnotisObject(objRootElement)then
Response.Write("nofileloaded")
else
Response.Write(objRootElement.childnodes(0).text)
endif
endif
%>