in reply to How to export hash to xml file
Use XMLout() from XML::Simple.
my $xml = XMLout($your_hashref); [download]