下面的代码解析了一个简单的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>输出:
$VAR1 = {
'string' => [
{}
]
};预期输出为:
$VAR1 = {
'string' => [
'SYNMAKE_LOCATION',
{}
]
};有人能帮我找出我的代码出了什么问题吗?
发布于 2021-07-09 17:14:38
看起来simplify doesn't work。
https://stackoverflow.com/questions/68314143
复制相似问题