Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Help with attributes and XML::Simple

by tobyink (Canon)
on Aug 01, 2012 at 10:02 UTC ( [id://984746]=note: print w/replies, xml ) Need Help??


in reply to Re: Help with attributes and XML::Simple
in thread Help with attributes and XML::Simple

If you've got a reasonably recent version of XML::LibXML, that can be made even simpler.

use XML::LibXML 1.94; use Data::Dumper; my %hash = XML::LibXML -> load_xml(location => 'mydata.xml') -> getElementsByTagName('Vendor') -> map(sub { $_->{vendorUniqueKey} => $_->{name} }); print Dumper \%hash;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-05-22 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found