Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: how to get XML::LibXML perfect xpath query ?

by Anonymous Monk
on Jun 13, 2010 at 11:14 UTC ( [id://844431]=note: print w/replies, xml ) Need Help??


in reply to Re^4: how to get XML::LibXML perfect xpath query ?
in thread how to get XML::LibXML perfect xpath query ?

See doc for findnodes, you need to bind a prefix to the namespace (xmlns), so
my $xpc = XML::LibXML::XPathContext->new; $xpc->registerNs( 'x', 'http://www.inktomi.com/' ); $xpc->findnodes( '/x:ysearchresponse/x:resultset_web/x:result/x:url', +$doc ) $xpc->findnodes( '*/*/x:result/x:url', $doc )

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://844431]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (None)
    As of 2024-04-25 03:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found