469,289 Members | 2,156 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

XMl chunk parsing problem in Javascript for IE6 or IE7

Hello Everyone,

This is my first post here.

I am trying to parse a xml chunk returned by server as a response of ajax type request in this way:

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. // code for IE
  4.     if (window.ActiveXObject)
  5.       {
  6.           var doc=new ActiveXObject("Microsoft.XMLDOM");
  7.           doc.async="false";
  8.           doc.loadXML(exactResponse);
  9.       }
  10.     // code for Mozilla, Firefox, Opera, etc.
  11.     else
  12.       {
  13.           var parser=new DOMParser();        
  14.           var doc=parser.parseFromString(exactResponse,"text/xml");
  15.       }
  16.  
The problem is that it is not working in IE6 or IE7.
Can anyone tell me to get around this problem?
I need it badly:(

Best regards,

Babu
Nov 30 '06 #1
1 3483
acoder
16,027 Expert Mod 8TB
If it's valid XML, it should be returned in the responseXML property.

To parse XML strings, see this example.
May 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

16 posts views Thread by Terry | last post: by
5 posts views Thread by Martin Walke | last post: by
reply views Thread by bruce | last post: by
3 posts views Thread by Rodrigo Meza | last post: by
6 posts views Thread by jackwootton | last post: by
1 post views Thread by avpkills2002 | last post: by
1 post views Thread by Philip Semanchuk | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.