<Types>
<Type id='1' name='sport'>
<SubTypes id='1' name='football' />
<SubTypes id='2' name='tennis' />
</Type>
<Type id='2' name='education'>
<SubTypes id='1' name='school' />
<SubTypes id='2' name='university' />
</Type>
</Types>
I have the previous XML file, and I want to parse it using Javascript, how can I access to all SubTypes for a specific Type ?
I used
var x=xmlhttp.responseXML.documentElement.getElementsByTagName("Type");
to parse the Types , but how can I parse the Subtypes for each type ?