I have the following XML structure:
<doc>
<group name="name1">
<group name="subname1">
<item att="att1"/>
</group>
<group name="subname3">
<item att="att3"/>
</group>
</group>
<group name="name2">
<group name="subname2">
<item att="att2"/>
</group>
</group>
</doc>
If I'm using dom.getDocumentElement().getElementsByTagName("group")
then I get all "group" of my xmlfile (name1, subname1, subname3,.......).
How to find only the first groups(name1 and name2)?