in reply to Ordered XML items (XML::Simple?)
XML::Simple cannot give you one array containing both <flag> and <list> elements - that's the price you pay for simplicity.
You could change your XML so that the elements had the same name and the type was determined through an attribute. You should set keyattr => [] to ensure an array of hashes doesn't get 'folded' into a hash of hashes. That will be happening at the moment since 'name' is one of the default values in keyattr.
Of course changing your XML because the tool is not powerful enough to work with it might suggest it's time to change the tool. XML::Twig would be worth a look.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ordered XML items (XML::Simple?)
by traveler (Parson) on Jan 17, 2003 at 22:20 UTC |