asp读取远程xml数据提示缺少对象

来源:百度知道 编辑:UC知道 时间:2024/06/24 15:38:03
set xmlhttp=Server.CreateObject("MSXML2.XMLHTTP")
xmlstr="<post_msg_req><auth><user_id>1000000098</user_id><site_id>2000076</site_id><timestamp>111111111123</timestamp><auth_id>1dab5c5a708ee032ae54dcc663b69c06</auth_id></auth><msg type=""user_list""><user_name>ooo</user_name><password>7f94dd413148ff9ac9e9e4b6ff2b6ca9</password></msg></post_msg_req>"
URL="http://s6.jeedu.com.cn/CenwaveUserList.do"
xmlhttp.open "POST",URL, False
xmlhttp.send xmlstr
if xmlhttp.readyState = 4 then
Set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.loadXML(xmlhttp.responseText)
Set item=xmlDoc.getElementsByTagName("result")
results = item.item(0).text

用HttpWatch监视一下回抛过来的值,是否是你希望的xml对象?

还有,
xmlDoc.loadXML(xmlhttp.responseText)??
我是用以下的:
xmlDoc=xmlHttp.responseXML;

我记得当时alert出来是有区别的好像.