in reply to XML::Simple, but not for me

You want to use ForceArray => [qw(make)] when constructing your XML::Simple object. Otherwise, XML::Simple will guess from the single appearance of the (only) make element that it can only appear once.

Replies are listed 'Best First'.
Re^2: XML::Simple, but not for me
by dalgetty (Acolyte) on May 01, 2007 at 15:27 UTC
    Thanks for those wise words, Corion! I am getting my head around it now.

    I did a Data::Dump and that is indeed the problem - when there is only one element the output is a hash table within a hash table, instead of an array of hash tables within a hash table.

    Is there any way to instruct XML::Simple to make an array of hash tables within a hash table without using the name of the element?

    Up until now this module has allowed the use of arbitrarily named elements and I would like to keep it this way.

    Thanks a lot,

    dalgetty