Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: XML Parsing,

by saberworks (Curate)
on Sep 09, 2009 at 22:37 UTC ( #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
Node Status?
node history
Node Type: note [id://794468]
help
Chatterbox?
[Discipulus]: Eduardo De Filippo explains how to do coffe - ITA

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-01-16 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (149 votes). Check out past polls.