|XP is just a number|
Clobbered keys in XML::Simpleby Rhose (Priest)
|on Aug 29, 2002 at 17:45 UTC||Need Help??|
What is happening here is that 'name' is one of the default key attributes for XML::Simple. (The defaults are 'name', 'key', and 'id'.) By changing this (with the keyattr option), I think you can get the desired results.
Here is a quick script I threw together which should demonstrate the differences. I hope it helps.
For more information on the options available with XML::Simple (forcearray is another one you will want to make sure you know), check out:
Make sure you look at the data structure dumped with Data::Dumper -- meta is now a two element array.
The following code will iterate through the meta array: