Following code parses a simple test.xml:
my $twig = XML::Twig->new();
my $file = 'test.xml';
my $Hash = $twig->parsefile($file)->simplify();
print Dumper($Hash);
test.xml:
<entry>
<string>SYNMAKE_LOCATION</string>
<string/>
</entry>
output:
$VAR1 = {
'string' => [
{}
]
};
the expect output is:
$VAR1 = {
'string' => [
'SYNMAKE_LOCATION',
{}
]
};
Can anyone help me find what is wrong with my code?
It seems
simplifydoesn't work.