I was looking for a quick way to spit out XML from a data structure and came across
XML::Smart. Nifty module. But I'm running into a stumbling block, which is that it is giving me attributes where I would like separate elements. My code is like this:
my $xml = XML::Smart->new;
$xml->{Body} = { Foo => 'Bar' };
$xml->save("test.xml");
and it is producing this output:
<Body Foo="Bar"/>
whereas I would like it to produce this output:
<Body><Foo>Bar</Foo></Body>
and was hoping there was a straightforward way to do so. Cheers,