I have been fiddling with this trying to get XML::Simple to produce the correct xml file. It makes a file it just doesn't read it back in correctly.
note: the g hash of arrays has at least 1 element but can be more.
In the current xml file output. It creates mutiple g's with 1 entry per g array item. Which when read back in it produces a differant struture. This is the options I am using to produce the file.
I tried the GroupTags => { '' => 'g' }but I dont know how have it recognize the parent of the g group.
any suggestions, solutions.
BTW the reason I dont just change the hash structure is I already have the application fully written and modifing 6000 lines of code will suck. I hope it will be the last ditch solution that I wont need.
Code:
my %t_type = (
...
'b' => {
a => {low => 1000, high => 3000, percent => 25},
b => {low => 200,high => 2000, percent => 30},
c => {low => 1000,high => 6000, percent => 40},
d => {low => 300,high => 1800, percent => 35},
e => {low => 10, high => 40, percent => 60},
f => {low => 2, high => 12, percent => 50},
g => [
{select => 'new',low => 1,high => 1,percent => 10},
{select => 'expert',low => 1,high => 1,percent => 10},
],
},
...
);
In the current xml file output. It creates mutiple g's with 1 entry per g array item. Which when read back in it produces a differant struture. This is the options I am using to produce the file.
Code:
print L $xsimple->XMLout(\%t_type,
noattr => 1,
xmldecl => '<?xml version="1.0"?>',
);
any suggestions, solutions.
BTW the reason I dont just change the hash structure is I already have the application fully written and modifing 6000 lines of code will suck. I hope it will be the last ditch solution that I wont need.