I'm using XML::Simple to read in an XML file, make a change to it, and then output the resulting XML. However, the output isn't formatted quite the way I want it. This is my code:
use XML::Simple;
$xml = XMLin("pre.xml");
$xml->{core}->{test} = 'testeroo';
$res = XMLout($xml);
print $res;
This is pre.xml:
<config>
<core>
<variable>ere</variable>
</core>
</config>
And this is the output:
<opt>
<core test="testeroo" variable="ere" />
</opt>
Is there any way to make the result look like:
<opt>
<core>
<test>testeroo</test>
<variable>ere</variable>
</core>
</opt>
If not, is there some other module that can make this happen?
Are you sure it was a book? Are you sure it wasn't.....nothing?