Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Not a HASH reference

by Anonymous Monk
on Mar 23, 2017 at 00:07 UTC ( [id://1185516]=note: print w/replies, xml ) Need Help??


in reply to Not a HASH reference

Hi,

xpath is easy with xpather.pl

use XML::LibXML; my $dom = XML::LibXML->new(qw/ recover 2 /)->load_xml( IO => $in ); for my $key ( $dom->findnodes( q{ /drug/* } ) ){ print $key->nodeName, "\n", $key->nodePath, "\n", $key->textValue, "###\n"; }

If /drug doesn't work then  *[local-name()='drug' ] will

Or even /x:drug if you use sub XML::LibXML::Node::F

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-24 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found