##
use strict;
use warnings;
use XML::Parser;
use Data::Dumper;
my $parse = new XML::Parser(Style => 'Objects');
my $address = "Eagle Way Gotham City ";
print Dumper $parse->parse($address);
####
C:\tmp>test.pl
$VAR1 = [
bless( {
'Kids' => [
bless( {
'Kids' => []
}, 'main::HNO' ),
bless( {
'Kids' => [
bless( {
'Text' => 'Eagle Way'
}, 'main::Characters' )
]
}, 'main::STN' ),
bless( {
'Kids' => [
bless( {
'Text' => 'Gotham City'
}, 'main::Characters' )
]
}, 'main::MCN' )
]
}, 'main::LOC' )
];
####
use strict;
use warnings;
use XML::Simple;
use Data::Dumper;
my $address = "Eagle Way Gotham City ";
my $ref = XMLin($address);
print Dumper $ref;
####
C:\tmp>test.pl
$VAR1 = {
'MCN' => 'Gotham City',
'HNO' => {},
'STN' => 'Eagle Way'
};