<tree>
<declarations>
<attributeDecl name="name" type="String"/>
</declarations>
<branch>
<attribute name="name" value="Malaria"/>
<branch>
<attribute name="name" value="Excess Stool"/>
<branch>
<attribute name="name" value="Do you have watery stool"/>
<branch>
</branch>
<attribute name="name" value="Do you have this condition for more than a weeks time"/>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="High Fever"/>
<branch>
<attribute name="name" value="Was your peak temperature greater than 104"/>
<branch>
<attribute name="name" value="Do you have high fever for more than a weeks time "/>
<branch>
<attribute name="name" value="Do you have chills"/>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="Bodyache"/>
<branch>
<attribute name="name" value="Do you have pain in the left part of the head "/>
<branch>
<attribute name="name" value="Do you have headache more than 5 times a day "/>
<branch>
<attribute name="name" value="Duration of the headache spans for more than a day "/>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
<branch>
<attribute name="name" value="No"/>
</branch>
</branch>
</branch>
</tree>
I have to parse this xml .I am using DOM parser to parse the same .Since attribute name is always name in this case , i am bit clueless as in how to parse the xml .