http://www.perlmonks.org?node_id=712137


in reply to Re: Namespaced XML::LibXML XPath query
in thread Namespaced XML::LibXML XPath query

So what you're saying is my xpath needs to be written like this:
$doc->findnodes('//myns:root/myns:stuff/myns:items/myns:book');
Given the following:
<root xmlns="http://goobar/xml" xmlns:myns="http://goobar/xml"> <stuff> <items> <book>XML Namespaces</book> </items> </stuff> </root>
That is really an ugly xpath expression.

Replies are listed 'Best First'.
Re^3: Namespaced XML::LibXML XPath query
by lestrrat (Deacon) on Nov 04, 2008 at 01:30 UTC
    blame the XML guys ;) default namespaces are just plain stupid.