http://qs321.pair.com?node_id=737156


in reply to Modified title: The structures created by many of the XML parsers in Perl appear unnecessarily deep in levels...

Hi,

You can use XML::Simple as well. XML::Simple->new( KeepRoot => 1, KeyAttr => 1, ForceArray => 1 ); This will gives everything array of hashes.

Replies are listed 'Best First'.
Re^2: Why oh why is working with XML so bloomin' difficult in Perl?
by wilsond (Scribe) on Jan 18, 2009 at 16:20 UTC

    If I didn't know my data input and wanted a simple way to get at it all without ref($var), I'd probably go this route. Then again, if you don't know your data input, you've got quite a bit of work cut out for you.


    If you want to do evil, science provides the most powerful weapons to do evil; but equally, if you want to do good, science puts into your hands the most powerful tools to do so.
    - Richard Dawkins