I’ve an XML File like this
<?xml version="1.0" standalone="yes" ?>
- <mypictures>
- <family>
<Abhilash title="WebDesigner" />
<Shon title="Programmer" />
<Rajan title="WebSupport" />
</family>
- <vacation>
<Siva title="WebAssistant" />
<Reji title="Designer" />
<Sam title="Support" />
</vacation>
</mypictures>
I can access the first node like this
news = new XML();
news.ignoreWhite = true;
news.load("family.xml");
news.onLoad = function(success){
if(success){
rootNode = news.firstChild.firstChild;
}
The result contains [Abhilash to Rajan]
The file will be populated with more nodes on later . But i want to know how to access the second child of the root node
It is possible like
rootNode = news.firstChild.firstChild.nextSibling;
Result contains [Sive to Sam ]
But the file populated with more node i don’t think it is a good practice. Any other way to get the rest of the nodes in the future. :red: