in reply to XMLout and Elements vs Attributes
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XMLout and Elements vs Attributes
by atreyu (Sexton) on Feb 20, 2014 at 17:07 UTC |