I'd like to read an XML file from on my local server from my website. This is how I'm doing it:
var xmlhttp = new XMLHttpRequest();
var langadr = "http://" + document.location.hostname + ":" + document.location.port + "/languages/language.xml";
xmlhttp.open("GET", langadr);
xmlhttp.send();
var xmlDoc = xmlhttp.responseXML;
But when I run it, I'm getting DOMException in the status and statusText fields of xmlhttp. The file is available directly via the url. The file is the sample from here. What am I doing wrong here?
xmlhttp.open("GET", langadr,true);xmlhttp.send(null);