In the provided XML data:
<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 am looking to select a node with a specific attribute value, such as 2.
I attempted the following code without success:
alert(xmlDoc.getElementsByTagName("product")[0].getAttributeNode("2"));
Any help or guidance on this matter would be greatly appreciated. Thank you.