Public Scratchpad | Download, Select Code To D/L |
For those interested, here's what I found to work.
With the following XML structure:
I was trying to create some code to check specific information in the data.<root> <element1/> <element2 attribute="positive"></element2> <element3/> </root>
Thanks to bart for pointing me in the right direction.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";}