Shooting from the hip, you need to change your data structure from
push(@{$ref{'node'}},{ 'id' => 'net_1.2.3.0', 'desc' => 'network', });
to
push(@{$ref{'node'}},{ 'id' => 'net_1.2.3.0', 'desc' => ['network'] , });
Or something similar.
An interesting note from the XML::Simple documentation: "The use of this module in new code is discouraged. Other modules are available which provide more straightforward and consistent interfaces. In particular, XML::LibXML is highly recommended." While I don't necessarily agree with the recommendation for XML::LibXML myself, I would take this under advisement and look for something else. I can highly recommend XML::Twig for ease of use and power.
In reply to Re: XMLout and Elements vs Attributes
by jellisii2
in thread XMLout and Elements vs Attributes
by atreyu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |