读书人

google天气查询webservice接口返回xml

发布时间: 2012-01-20 18:53:53 作者: rapoo

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;却没有
这是什么情况呢?

读书人网 >Java Web开发

热点推荐