In that XML :
<elements>
<product id="1">
<brand>xxxxxxx</brand>
<dci>xxxxx</dci>
<therapeutic_area>xxxxxx</therapeutic_area>
</product>
<product id="2">
<brand>xxxxxx</brand>
<dci>xxxx</dci>
<therapeutic_area>xxxx</therapeutic_area>
</product>
<product id="3">
<brand>xxx</brand>
<dci>xxxx</dci>
<therapeutic_area>xxxxx</therapeutic_area>
</product>
I need to select the node which has a specific attribute value. For instance 2
I tried this but it does not work:
alert(xmlDoc.getElementsByTagName("product")[0].getAttributeNode("2"));
Thanks in advance for your help
</elements>by parsing there or is it missing from the xml file?