I am loading some XML via Ajax.
here is a snippet of the script:
ajaxRequest.onreadystatechange = function()
{
if(ajaxRequest.readyState == 4)
{
document.getElementById('loading').innerHTML = 'done';
google_xml = ajaxRequest.responseXML;
document.getElementById('xml').innerHTML = 'XML: '+google_xml.toXMLString();
}
}
The page I am loading is an XML file, the file loads because if I alert(ajaxRequest.responseText); I see it. But I am not sure how to process it as XML I thought the above script would put the XML as a string into the < div id="xml" >< /div > element but it doesnt.
I have used E4X to process XML a lot in Actionscript but never in JS, can someone give me a hint? Thanks!