I am not sure if this is even possible. Basically I want to load a local html file on a client PC and have it make a request to a remote server. The data served up by the server is XML.
When I say I am loading a file, I mean the URL in chrome appears as "file:///E:/..."
This is the closest I have gotten to being able to load the XML. I inspected the network tab on the client end and its successfully loading, I just cant seem to get the XML into an element I can inspect:
var script = document.createElement('script');
script.setAttribute('src', 'http://xxx.xx.xx.xxx:xxxx/myxmldata');
script.setAttribute('type', 'text/xml');
script.setAttribute('id', 'myxml');
document.getElementsByTagName('head')[0].appendChild(script);
var content = document.getElementById("myxml").responseText;// anything I can do here?
console.log(content);
An AJAX solution would work too. I didn't have any luck with JSONP (this isn't JSON, though).