You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
i have parsed xml through javascript but i have one confusion
i dont know how to parse an instruction parent which has all the child elements in it
if some one could help me out
<instructions>
<p> "test" is a parent element which gives a complete description of the "test" </p>
<p> " description" gives you the details as to what the test is and its features" </p>
</instructions>
I'm confused, what does the last post have to do with the one before it? If you have separate questions can you start a fresh post for each?
For the last post you need xmlDoc.getElementsByTagName("instructions")[0].childNodes[0].childNodes[0].nodeValue, for the previous one you need paramet/para1/@text and the string value of paramet/para1. Otherwise try to provide a clearer description of what you currently have and what exactly you need.