in reply to XML::Simple parsing :-(
#!/usr/bin/perl -w use strict; use XML::Simple; use Data::Dumper; my $doc; open(FH, "inc.xml") || die "Can't open inc.xml"; sysread(FH, $doc, -s FH); close FH; my $xs = new XML::Simple; # can use forcearray and keeproot my $ref = $xs->XMLin("$doc"); # works print $ref->{incident}->{'GDOT-INC-260089'}->{location}->{county}->{co +ntent} . "\n"; # doesnt work print $ref->{'incident'}->[0];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: XML::Simple parsing :-(
by graff (Chancellor) on Jun 20, 2003 at 03:12 UTC | |
|
Re: Re: XML::Simple parsing :-(
by st4k (Novice) on Jun 19, 2003 at 21:45 UTC | |
by chip (Curate) on Jun 19, 2003 at 22:28 UTC | |
by st4k (Novice) on Jun 20, 2003 at 00:12 UTC | |
by bobn (Chaplain) on Jun 20, 2003 at 03:01 UTC |