Hi,
I have the following XML:
...
<aaa>
<bb>
<ccTemplate>../dir1/dir2/file3.xml</ccTemplate>
<dd>
</dd>
</bb>
<ee>
</ee>
<ff>
<gg>
<hhTemplate>../dir1/dir2/file4.xml</hhTemplate>
</gg>
</ff>
</aaa>
This XML file is parsed into a DOM tree Document. How do I retrieve the attribute values for all the tags that contains the string "Template"? Output expected:
../dir1/dir2/file3.xml
../dir1/dir2/file4.xml
I was trying to use getElementsByTagName() method but it works only for the exact tag name.
Thanks for any light! Regards,
BtcMan
I have the following XML:
...
<aaa>
<bb>
<ccTemplate>../dir1/dir2/file3.xml</ccTemplate>
<dd>
</dd>
</bb>
<ee>
</ee>
<ff>
<gg>
<hhTemplate>../dir1/dir2/file4.xml</hhTemplate>
</gg>
</ff>
</aaa>
This XML file is parsed into a DOM tree Document. How do I retrieve the attribute values for all the tags that contains the string "Template"? Output expected:
../dir1/dir2/file3.xml
../dir1/dir2/file4.xml
I was trying to use getElementsByTagName() method but it works only for the exact tag name.
Thanks for any light! Regards,
BtcMan