in reply to xml using XML::Simple reording of XML-Content

In this post there was good advice: Re^2: XML::Simple how do i keep the same xml format (Values and Attributs)?

UPDATE: Only way I see is to create 4 XML files for the second level in your tree according to the desired order, and then manually create the outer structure around them. For example:

use strict; use warnings; use XML::Simple; my $TGROUP = { COLS => 4, COLSPEC => [ 1, 2, 3, 4 ], THEAD => { head => "head" }, TBODY => { body => "body" }, }; print "<TABLE>\n"; for ( qw( COLS COLSPEC THEAD TBODY ) ) { # in your desired order print XMLout( {$_ => $TGROUP->{$_}}, RootName => $_, KeepRoot => +1, NoATTR => 1 ); } print "</TABLE>\n";