Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Anyone please help me to read the below xml file data. i mainly want to read the data between the guid & code tag. so, please help me to read these data using javascript.
 
this is my xml data.
 
<response>
   <code>103</code>
   <message>
      <guid>Tabledata</guid>
   </message>
</response>
 

Please provide me a javascript code to read the xml data's between the xml tag names code and guid.
Posted 10-Sep-12 5:41am
Edited 10-Sep-12 17:29pm
v3
Comments
Sergey Alexandrovich Kryukov at 10-Sep-12 15:47pm
   
Help with what? This post is not a question. Did you notice that you post at Questions & Answer forum?
--SA
Mayjo Antony at 10-Sep-12 23:32pm
   
sir, Please provide me a javascript code to read the xml data's between the xml tag names code and guid from the above xml.
Sergey Alexandrovich Kryukov at 11-Sep-12 13:15pm
   
This is too boring work to do, and remember it's your work. Could you better explain where did you stuck? What's the issue? Why could not you do it?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

With such a simple XML file, you can use JavaScript window.DOMParser or Microsoft.XMLDOM (actually, both of them, for browser compatibility). Please see:
http://www.w3schools.com/xml/xml_parser.asp[^].
 
Actually, the major problem is to bring the many XML APIs available in nearly all parsers except IE, to IE, to round up the compatible browser set with API like DOMParser, XMLSerializer, XSLTProcessor. This can be done with Sarissa ECMAScript library:
http://dev.abiss.gr/sarissa/[^].
 
Good luck,
—SA
  Permalink  

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

  Print Answers RSS
0 CHill60 360
1 Sarvesh Kumar Gupta 248
2 OriginalGriff 218
3 Sergey Alexandrovich Kryukov 158
4 RyanDev 120


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 11 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid