in reply to Re^5: Problem in reading parsed xml using XML::Simple
in thread Problem in reading parsed xml using XML::Simple
Which gave:print Dumper ( $xst->{cmts}{STBDSG}{dsg} ); print Dumper ( $xst->{cmts}{STBDSG}{dsg}[0] ); print Dumper ( $xst->{cmts}{STBDSG}{dsg}[0]{tag1} );
So I think problem is what choroba stated earlier that $xst->{cmts}{STBDSG}{dsg}[0]{tag1} is getting undef :-( I think I have to dig deep in this part of my code:$VAR1 = [ {} ]; $VAR1 = {}; $VAR1 = undef;
It seems that answer to why $xst->{cmts}{STBDSG}{dsg}[0]{tag1} is getting undef is known to either KeyAttr or forcearray (or both). I am trying to find it out from them :-)my $xst; if((not defined $xml) or ($xml =~ m/read\stimeout/i)){ &printXMLErr('request timed out'); } else { my $xs = XML::Simple->new(); $xst = eval { $xs->XMLin($xml,KeyAttr=>1) }; &printXMLErr($@) if($@); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Problem in reading parsed xml using XML::Simple
by tangent (Parson) on Jun 24, 2015 at 18:52 UTC | |
by Perl300 (Friar) on Jun 24, 2015 at 19:36 UTC |