Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: XML::Lib XML questionby ikegami (Patriarch) |
on Oct 22, 2009 at 08:31 UTC ( [id://802691]=note: print w/replies, xml ) | Need Help?? |
Regarding your update...
There is no {}yyy element at the root (or anywhere else in your XML document), so LibXML is correct in returning nothing. You want to match the {http://xxx}yyy element, so you need to use
As I mentioned earlier, this is documented in XML::LibXML::Node, under findnodes, under "NOTE ON NAMESPACES AND XPATH". "xxx" can be replaced with any identifier you wish, as long as you use what you pass to registerNS in your queries. Update: I had forgotten the include the root node in the XPath. Fixed.
In Section
Seekers of Perl Wisdom
|
|