in reply to Re^4: XML::Parser - Code Reference Error?
in thread XML::Parser - Code Reference Error?
Perhaps all you need is XML::Simple ?
#!/usr/local/bin/perl -w use warnings; use strict; use XML::Simple; use Data::Dumper; my $xs = new XML::Simple(KeepRoot => 1); my $address = "<LOC><HNO></HNO><STN>Eagle Way</STN><MCN>Gotham City</M +CN></LOC>"; my $ref = $xs->XMLin($address); print Dumper($ref); # to print "Eagle way" print $ref->{LOC}->{STN};
|
|---|