I am trying to use the XMLhttpresponse to return the XML from the weather.com xml feed to great a google desktop gadget.
I can access the responceText property and see the XML but when I try to see the XML in the responseXML it displays nothing. Can someone help me with this? I have pasted that section of the code below for reference. Thanks, Carla
[CODE]// The current XMLHttpRequest object
var RSS_req = null;
function RSS_startRequest()
{
// Try to create new request objects until one succeeds
RSS_req = new XMLHttpRequest();
RSS_req.onreadystatechange = RSS_onReadyStateChange;
RSS_req.open(‘GET’, CONST_URLcc, true);
RSS_req.send();
}
/**
* XMLHttpRequest state change handler that passes the RSS XML document to
* the parser and continues on to the next feed.
*/
function RSS_onReadyStateChange()
{
if (RSS_req.readyState == 4)
{
// Parse the response and destroy request object
RSS_parse(RSS_req.responseText);
RSS_req = null;
}
}
function RSS_parse(responseText)
{
alert(responseText);
var xmlDoc = new ActiveXObject(“MSXML.DOMDocument”);
//var xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”);
xmlDoc.async=”false”;
xmlDoc.load(responseText);
alert(xmlDoc.xml)
}