Click here to Skip to main content
15,901,666 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,


Am very new face for xml and javascript. now i wants to parsing xml document.Here am send few lines of coding, it will work fine for firebox but not working with IE. All replies welcome.

C#
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari

         xmlhttp = new XMLHttpRequest();

     }
     else {// code for IE6, IE5
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

     }
     xmlhttp.open("get", "networkservices.xml", false);
     xmlhttp.success_action_status = 200;
     xmlhttp.send();
     xmlDoc = xmlhttp.responseXML;
     xmlObj = xmlDoc.documentElement;
     var val = xmlDoc.getElementsByTagName("item").length;

     for (var i = 1; i < val; i++) {

         var _title = xmlDoc.getElementsByTagName("title")[i].firstChild.nodeValue;
         var _description = xmlDoc.getElementsByTagName("description")[i].firstChild.nodeValue;
         var _link = xmlDoc.getElementsByTagName("link")[i].firstChild.nodeValue;
         var _thumbnail = xmlDoc.getElementsByTagName("media:thumbnail")[i].url;




Thanks and Regards,

Dhineshkumar Velmayil.
Posted
Comments
Rockstar_ 31-May-13 7:52am    
What not working dear?

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