Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: XML::Simple Usage

by toolic (Chancellor)
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 drinking their drinks and smoking their pipes about the Monastery: (18)
As of 2014-07-14 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (268 votes), past polls