Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: XML::LibXML::XPathContext findnodes() Question

by roman (Monk)
on Dec 20, 2008 at 10:00 UTC ( [id://731742]=note: print w/replies, xml ) Need Help??


in reply to Re^2: XML::LibXML::XPathContext findnodes() Question
in thread XML::LibXML::XPathContext findnodes() Question

You should probably use $doc->findvalue instead of findnodes because your XPath expression doesn't return a nodeset but boolean value.

warn $doc->findvalue('/root and /root/element1'), "\n"; warn $doc->findvalue('/root and /root/nosuch'), "\n";

yields:

true false

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 20:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found