Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
The stupid question is the question not asked
 
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);


Comment on Re: XML Parsing,
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-04-20 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (487 votes), past polls