日期:2014-05-17  浏览次数:20648 次

google天气查询webservice接口返回xml为空
返回之后
var doc = httpReq.responseText;有值 
var doc = httpReq.responseXML;却没有
这是什么情况呢?


------解决方案--------------------
xmlhttp.open("GET", "http://localhost/books.xml", false);
xmlhttp.send();
WScript.Echo(xmlhttp.responseXML.xml);


只是猜测,看msdn上给出的示例是这样的,不知是否有些关系

http://msdn.microsoft.com/en-us/library/windows/desktop/ms757066%28v=vs.85%29.aspx
------解决方案--------------------
返回之后
var doc = httpReq.responseText;有值
var doc = httpReq.responseXML;却没有
这是什么情况呢?

那就是说返回的内容是text格式,而不是xml格式

------解决方案--------------------
探讨
返回之后
var doc = httpReq.responseText;有值
var doc = httpReq.responseXML;却没有
这是什么情况呢?