in reply to Re: Reading from a flat text file database and storing contents in a hash
in thread Reading from a flat text file database and storing contents in a hash
When using XML::Simple I get this:$VAR1 = '1'; $VAR2 = { 'host' => { 'hosta' => 1 }, 'name' => 'servicea' }; $VAR3 = '2'; $VAR4 = { 'host' => { 'host0' => 2, 'host5' => 2 }, 'name' => 'serviceb' };
I am using the following XML with XML::simple.$VAR1 = { 'name' => 'servicea', 'host' => [ { 'hosta' => '2' }, { 'hostb' => '2' } ]
Is there any way I can change the XML, so XML::simple only uses hash of hashes instead of hashes and arrays? Thanks<?xml version='1.0'?> <services> <name>servicea</name> <host> <hosta>2</hosta> </host> <host> <hosta>2</hosta> </host> </services>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reading from a flat text file database and storing contents in a hash
by dragonchild (Archbishop) on Apr 20, 2007 at 14:42 UTC | |
by wishartz (Beadle) on Apr 20, 2007 at 14:52 UTC | |
by dragonchild (Archbishop) on Apr 20, 2007 at 16:19 UTC |