Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: XML::Simple Usage

by toolic (Bishop)
on Sep 19, 2012 at 12:20 UTC ( #994454=note: print w/ replies, xml ) Need Help??


in reply to XML::Simple Usage

XML::Simple ForceArray may do what you need:

use warnings; use strict; use XML::Simple; my $xml = XML::Simple->new(ForceArray => 1); my $xml_Load = $xml->XMLin("Input.xml"); $xml->XMLout($xml_Load,OutputFile => "Output.xml"); # Here is the Output.xml file: __END__ <opt> <global> <glob1 value="g1v" /> <glob2 value="g2v" /> <glob3 value="g3v" /> </global> <parmsets> <example> <local> <loc2 value="loc2v" /> <loc3 value="loc3v" /> <location value="location" /> </local> <regional> <region1 value="region1v" /> <region2 value="region2v" /> <region3 value="region3v" /> </regional> </example> </parmsets> </opt>


Comment on Re: XML::Simple Usage
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994454]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-07-08 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls