On Thu Nov 05 11:53:27 2015, tvmaly@gmail.com wrote:
Show quoted text> If I have xml that is not nesting as I expected in simple mode. Is
> this type of xml not supported?
>
> <parent>
> <child id="1" group="2" />
> <child id="2" group="2" />
> </parent>
>
> I get back the following using ->simple() for $tree->{parent}
>
> {
> 'child' => {
> id => '1',
> child => {
> content => 'id="2" group="2" />'
> }
> }
> }
Unsure what was/is causing this in the possibly current CPAN version of XML::Bare, but this has been fixed in the current development version.
If you clone
https://github.com/nanoscopic/perl-XML-Bare and install that this problem does not exist there.
There are a number of other existing issues. As I recall "simple" is basically completely broken in the current live CPAN version of XML::Bare. I would recommend avoiding it until the next CPAN release.
Output of current development version: ( proper )
$VAR1 = {
'parent' => {
'child' => [
{
'id' => '1',
'group' => '2'
},
{
'group' => '2',
'id' => '2'
}
]
}
};