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
|
---|
In Section
Seekers of Perl Wisdom