javascript - Parse xml doc on internet explorer -


i want parse xml doc. following code snippet:

//following on receiving xml doc   self.xmlhttpreq.onreadystatechange = function()   {   if(self.xmlhttpreq.readystate == 4 && self.xmlhttpreq.status == 200)   {     if (navigator.appname == 'microsoft internet explorer')     {       xmldoc = self.xmlhttpreq.responsetext;       var reqst = new regexp("<d0>0"); //this binary value         //how parse in ie??         }      else  // moz, chrome        {        xmldoc = self.xmlhttpreq.responsexml;          xmldat1 = xmldoc.getelementsbytagname('d0')[0].firstchild.nodevalue;          xmldat2 = xmldoc.getelementsbytagname('d1')[0].firstchild.nodevalue;        }   }   

the above parsing works mozilla , chrome, ie how can parsing?
note: can't use jquery technique.

you need set particular line when parsing ie5 , ie6:

xmlhttp=new activexobject("microsoft.xmlhttp");

check link:

http://www.w3schools.com/xml/xml_parser.asp

this might understand better.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -