Skip Menu |

This queue is for tickets about the XML-Bare CPAN distribution.

Report information
The Basics
Id: 108487
Status: open
Priority: 0/
Queue: XML-Bare

People
Owner: cpan [...] codechild.com
Requestors: tvmaly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.53
Fixed in: (no value)



Subject: issue with nesting of xml in simple mode
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" />' } } }
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' } ] } };