Getting child nodes....

wxdqz

New Member
Hello all,I have a typical problem.I am using DOM implementation for xml.Pls look at the following structure<MainNode><SubNode1><cNode1 attrib/><cNode2 attrib/><cNode3 attrib/></SubNode1><SubNode2><cNode1 attrib/><cNode2 attrib/><cNode3 attrib/></SubNode2></MainNode>Okay, now when I say get the child nodes of node 'SubNode1', I shouldget a NodeList of size 3, right?.But when I do the following I get a NodeListwith a size of 7.....DOM_NodeList mainList = doc.getElementsByTagName("MainNode");DOM_NodeList subList = (mainList.item(0)).getChildNodes();Can you pls tell me where I am going wrong....TIASam
 
Back
Top