I am just trying to create the XML
use XML::Simple;
my %element = ( "a" => "10" ,
"b" => "20" ,);
my $xs = new XML::Simple();
my $ref = $xs->XMLin(%element);
my $xml = $xs->XMLout($ref);
print $xml;
What is wrong on this code ? ( This is got Resolved )
use XML::Simple;
my %element = ( "a" => "10" ,
"b" => "20" ,);
my $xs = new XML::Simple();
my $xml = $xs->XMLout(\%element);
print $xml;
This produces the following output:
<opt a="10" b="20" />
But what I'd really like to get is this:
<a> 10 </a>
<b> 20 </b>
How can I achieve this?