Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: XML Parsing,

by saberworks (Curate)
on Sep 09, 2009 at 22:37 UTC ( [id://794468]=note: print w/replies, xml ) Need Help??


in reply to XML Parsing,

Use Data::Dumper to print out the $config variable after you parse it. Do this with the bad file and with a good file so you can spot the difference. As the first commenter mentioned, you can likely pass an option to XMLIn called ForceArray so the Vehicle element is always an array (but will likely do it to other elements as well).
use Data::Dumper; ... $config = XMLin( $xml, SuppressEmpty => "" ); warn Dumper($config);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found