perl_help27 has asked for the wisdom of the Perl Monks concerning the following question:
This is outputting :use XML::Simple; use Data::Dumper; my $hash= { 'root' => { 'item1' => { 'item1a' => 'n1', 'item1b'=>'jh' } } }; my $xs = new XML::Simple; my $xml = $xs->XMLout($hash, NoAttr => 1, RootName=>undef,); print Dumper $xml;
But I want the xml to be ALL nested like that:<root> <name>item1</name> <item1a>n1</item1a> <item1b>jh</item1b> </root>
What do you think I should do?? Please help I am stuck :S Thanks<root> <item1> <item1a>n1</item1a> <item1b>jh</item1b> </item1> </root>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XMLOut in XML::Simple returning unwanted xml format
by haukex (Archbishop) on May 21, 2018 at 14:47 UTC | |
by perl_help27 (Acolyte) on May 22, 2018 at 18:40 UTC | |
by marto (Cardinal) on May 22, 2018 at 20:39 UTC | |
by BrowserUk (Patriarch) on May 23, 2018 at 01:32 UTC | |
|
Re: XMLOut in XML::Simple returning unwanted xml format
by salva (Canon) on May 21, 2018 at 15:12 UTC | |
|
Re: XMLOut in XML::Simple returning unwanted xml format
by Veltro (Hermit) on May 21, 2018 at 15:03 UTC | |
by perl_help27 (Acolyte) on May 22, 2018 at 18:39 UTC |