Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How i can read XML file from url (http://www.website.com/xmlfile.xml) using JavaScript
Posted

1 solution

It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.



I will provide you a hint on it. Read about XMLHttpRequest (traditional Ajax). using it, you can send a request to URL and get back the response as an XML. Try out.
 
Share this answer
 
Comments
engmebeed 3-Feb-13 4:09am    
Thanks for replay:
I have try to use it like:
function createCORSRequest(method, url) {
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr) {
xhr.open(method, url, true);
} else if (typeof XDomainRequest != "undefined") {
xhr = new XDomainRequest();
xhr.open(method, url);
} else {
xhr = null;
}
return xhr;
}
And there are some error could you help??
Sandeep Mewara 3-Feb-13 4:17am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900