Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Namespaced XML::LibXML XPath query

by chovy (Initiate)
on Sep 17, 2008 at 22:43 UTC ( #712137=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://712137]
help
Chatterbox?
[stevieb]: glad I have an exceptionally high-quality test regimen for the Pi with...
[stevieb]: ...a diagram of how to set it up. Allows me to not only test my software, but the hardware, side-by-side.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-01-16 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (192 votes). Check out past polls.

    Notices?