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 Sergey Alexandrovich Kryukov 480
1 mhegazy94 460
2 Ravi Bhavnani 190
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,135
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,619
4 Gihan Liyanage 2,797


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100