I have a question about reading the XML in IE using javascript. I have the following javascript, it should read an XML file. However, I can only read the XML file in FireFox but not IE. Can anyone help me?
It shows 'Access is denied'
function loadXMLDoc(location) { // location = './abc/abc.xml'
if (window.XMLHttpRequest) {
xhttp=new XMLHttpRequest();
}
else {
xhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET",location,false); // IE mention the error in here
xhttp.send();
return xhttp.responseXML;
}
p.s I found the example in here 'http://www.w3schools.com/dom/tryit.asp?filename=try_dom_loadxml'