Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

ramrod's scratchpad

by ramrod (Curate)
on Feb 09, 2009 at 14:46 UTC ( #742450=scratchpad: print w/replies, xml ) Need Help??

For those interested, here's what I found to work.

With the following XML structure:
<root> <element1/> <element2 attribute="positive"></element2> <element3/> </root>
I was trying to create some code to check specific information in the data.
my $test=XMLin('path\file.xml', KeepRoot=>1, KeyAttr=>"element2", Forc +eArray=>0); if($test->{root}->{element2}->{attribute} eq "positive") {print "Found It";} else {print "No Luck";}
Thanks to bart for pointing me in the right direction.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[stevieb]: I'm having issues finding an arduino library that does the right thing for my gps... five hours now. I'm going to just write my own parser

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-05-28 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?