0

I'm Learning node js,basically i want to parse xml in node js,but i dont know how to parse/travarse nodes and print each node.whether i need to use any library to parse.Eg. if i have tree structure like this then how to parse it. <Java><Question><Descrpiton>What is variable?</Descrpiton><A>varies</A><B>varies</B><C>varies</C><D>varies</D><answer>A</answer></Question></java>Please help me how to parse and read each element using node.js?

khanam
  • 335
  • 1
  • 4
  • 19
  • Take a look at http://stackoverflow.com/questions/14890655/the-best-node-module-for-xml-parsing. The top recommendation xml2js has good documentation on its website: https://www.npmjs.com/package/xml2js – morphatic Jul 14 '15 at 03:51
  • 1
    Once you've followed the basic tutorial on their website, if you are having difficulties making something work, then come back here to ask for help, and show us what you've done and where you're stuck. – morphatic Jul 14 '15 at 04:00

0 Answers0