I
it_says_BALLS_on_your_forehead
To: Grant McLean
am i missing something? it appears that "folding" is broken for single
items. this is for ver. 2.14.
i'm basing subroutine on the data structure created by XMLin(), but it
assumes that folding will occur even on single elements. did i miss
something in the docs? i just would like to know oif this is working as
it should, and i need to code around it, or if this is a bug. try the
code below with $good versus $bad, and you will see what i mean. the
$good string is the same as in the docs. thanks! LOVE the module btw
:-D.
==================
use strict; use warnings;
use XML::Simple;
use Data:
umper;
my $good = q{<opt><user login="grep" fullname="Gary R Epstein" />} .
q{<user login="stty" fullname="Simon T Tyson" /></opt>};
my $bad = q{<opt><user login="grep" fullname="Gary R Epstein" />} .
q{</opt>};
my $ref = XMLin($bad,
#ForceArray => 1,
KeyAttr => ['login'],
GroupTags => {data => 'item'},
);
print Dumper($ref);
=====
$VAR1 = {
'user' => {
'fullname' => 'Gary R Epstein',
'login' => 'grep'
}
};
am i missing something? it appears that "folding" is broken for single
items. this is for ver. 2.14.
i'm basing subroutine on the data structure created by XMLin(), but it
assumes that folding will occur even on single elements. did i miss
something in the docs? i just would like to know oif this is working as
it should, and i need to code around it, or if this is a bug. try the
code below with $good versus $bad, and you will see what i mean. the
$good string is the same as in the docs. thanks! LOVE the module btw
:-D.
==================
use strict; use warnings;
use XML::Simple;
use Data:
my $good = q{<opt><user login="grep" fullname="Gary R Epstein" />} .
q{<user login="stty" fullname="Simon T Tyson" /></opt>};
my $bad = q{<opt><user login="grep" fullname="Gary R Epstein" />} .
q{</opt>};
my $ref = XMLin($bad,
#ForceArray => 1,
KeyAttr => ['login'],
GroupTags => {data => 'item'},
);
print Dumper($ref);
=====
$VAR1 = {
'user' => {
'fullname' => 'Gary R Epstein',
'login' => 'grep'
}
};