1
2dim xmlhttp,xmldoc
3set xmlhttp = Server.CreateObject("MSXML2.XMLHTTP")
4xmlhttp.open "POST","test.asp",false
5xmlhttp.send "id=1"
6if xmlhttp.readyState=4 then
7set xmldoc = Server.CreateObject("MSXML2.DOMDocument")
8xmldoc.load xmlhttp.responseXML
9xmldoc.async = false
10response.write xmldoc.xml
11end if
可是response.write xmldoc.xml无法显示啊,如果用response.write xmlhttp.responseText就可以显示出结果,请问这是为什么啊?
---------------------------------------------------------------
用Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")试试。
也可以先看看test.asp返回的结果到底是不是符合XML语法。
可参看xml实例:http://xmlnews.39203.com/