'user' => { 'favorites' => [ { 'title' => 'Book1','genre' => '5','author' => 'Someone' }, { 'title' => 'Book2','genre' => '1','author' => 'Someone' } ] } #### Book1 5 Someone Book2 1 Someone #### Book1 5 Someone Book2 1 Someone #### use XML::Simple qw(:strict); #must use strict my $xs = new XML::Simple; my $xml = $xs->XMLout($req,NoAttr => 1,RootName=>'user',KeyAttr=>[]);