Hi all,
I'm working with some XML files using perl-5.8.7 and p5-XML-XPath-1.13 on FreeBSD6.
How do I get the name of an XML element using XPath? I know the position of where this element would be. In the example below I need a function that returns the string "mystery_tag", knowing that this would be the first child of /root/data/details/
My knowledge of perl is quite limited so any links with examples using XPath would be appreciated.
thanks
I'm working with some XML files using perl-5.8.7 and p5-XML-XPath-1.13 on FreeBSD6.
How do I get the name of an XML element using XPath? I know the position of where this element would be. In the example below I need a function that returns the string "mystery_tag", knowing that this would be the first child of /root/data/details/
Code:
<root>
<info>some text</info>
<more_info></more_info>
<data>
<details>
[!]<mystery_tag>[/!]
<a>some</a>
<b>text</b>
<c>here</c>
</mystery_tag>
<stuff></stuff>
</details>
</data>
</root>
My knowledge of perl is quite limited so any links with examples using XPath would be appreciated.
thanks