in reply to XML module which one
XML::Simple can do it:
use strict; use warnings; use 5.012; use XML::Simple; my %form_data = ( name => 'Joe', weight => 180, ); my $xml_obj = XML::Simple->new(RootName => 'form1'); say $xml_obj->XMLout( \%form_data, noattr => 1, xmldecl => q{<?xml version="1.0">}, ); --output:-- <?xml version="1.0"> <form1> <name>Joe</name> <weight>180</weight> </form1>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: XML module which one
by spencerr1 (Novice) on Feb 05, 2013 at 04:15 UTC | |
by 7stud (Deacon) on Feb 05, 2013 at 04:38 UTC | |
by Anonymous Monk on Feb 05, 2013 at 07:47 UTC | |
by spencerr1 (Novice) on Feb 05, 2013 at 14:18 UTC |
In Section
Seekers of Perl Wisdom