not easy/possible to specify when something is an attribute versus an element using XML::Simple
Actually XML::Simple has a very simple rule for determining whether to output something as an attribute vs a nested element. If the value is a plain scalar, it will be output as an element, otherwise it will be a nested element. E.g.:
print XMLout({person => { id => 123, name => ['John Doe']}})gives:
<opt> <person id="123"> <name>John Doe</name> </person> </opt>
Having said that, I'd encourage the use of a different module for anything non-trivial.
In reply to Re: A data structure for XML generation
by grantm
in thread A data structure for XML generation
by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |