I have a XML file which contains
----------------------------------------------------------
<Person>
<Good>
<Name1>XXX</Name1>
<Name2>YYY</Name2>
</Good>
<Bad>
<Name3>ZZZ</Name3>
</Bad>
<Excellent>WWW</Excellent>
</Person>
-----------------------------------------------------------
I have used a DOMParser to parse and create a document named
doc from this file.
Then I have done
-----------------------------------------------------------
NodeList nl = doc.getElementsByTagName("Person");
------------------------------------------------------------
The number of nodes in the node list is 7.
Upto this everything is fine. But I am getting confused whenever I am trying to access the nodes by getNodeName() and getNodevalue() in the nodelist.
Will u please help me to understand the tree view of this document? I mean, how the XML tags are represented in the nodelist?
Please help.