thunders has asked for the wisdom of the Perl Monks concerning the following question:
Then I manipulate the structure by adding a pc name with and changing $config->{'installto'}->{'subdir'} = "otherdirectory"; I feed the altered hashref to XMLout($config); and the output is a little different.<config id="Installer"> <pclist> <pc>MYPC1</pc> <pc>MYPC2</pc> <pc>MYPC3</pc> </pclist> <installfrom>C:\install</installfrom> <installto> <path>C:\Program Files</path> <subdir>directory</subdir> </installto> <logon> <domain>mydomain</domain> <user>someuser</user> <pass>blahblah</pass> </logon> </config>
Somehow the pclist which refers to an array ref is fine. but the other nested tags get all fubared into single elements. Am I doing something wrong?<pclist> <pc>MYPC1</pc> <pc>MYPC2</pc> <pc>MYPC3</pc> <pc>MYPC4</pc> </pclist> <logon pass="blahblah" domain="mydomain" user="someuser" /> <installto path="C:\Program Files" subdir="otherdirectory" /> </opt>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML formatting problems with XML::Simple
by mirod (Canon) on Jun 11, 2002 at 20:16 UTC | |
by thunders (Priest) on Jun 11, 2002 at 21:02 UTC |