in reply to XML format help

What you are experiencing can be corrected by setting forcearray => 1 with XMLin(). I threw together a quick example which will demonstrate the differences. (Your sample XML file is in.xml.)

One other thing I have found to be helpful when working with XML::Simple is Data::Dumper.

#-- Sample code use strict; use XML::Simple; my $mXML; print "Without forcearray...\n"; $mXML = XMLin('./in.xml'); print XMLout($mXML); print "\n\n"; print "With forcearray...\n"; $mXML = XMLin('./in.xml',forcearray => 1); print XMLout($mXML);