Click here to Skip to main content
15,847,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Team,
I want to read xml using XMLHttpRequest. below code works fine firefox but not working in Chrome.

xmlhttp = new XMLHttpRequest();, false);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlDoc = xmlhttp.responseXML;

i don't know, what to do. if any one know about the share me the answer.

Nanda Kishore.CH
Solai Raja 3-Mar-15 1:18am    
check with developer tool's console for JavaScript errors. Press f12 then refresh your page.

You could try using jQuery, that will take away any browser inconsistenties.
Although it should work. So maybe go for Solai Raja's advice.
Share this answer
Consult the documentation for "open", the first param is the method (get, post etc) and then the url and asynch"GET", xmlpath, false);
Share this answer

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