$VAR1 = {
'Stuff1' => 'Data Stuff',
'ImportantStuff' => {
'MoreStuff' => {
...
},
'VeryImportantStuff' => {
'Item1' => {
'Description' => 'Need To Know',
'Date' => '20040101',
},
'Item2' => {
...
},
'Item3' => {
...
},
},
},
};
####
#pseudo code
struct SubFields => {
Description => '$',
Date => '$',
};
my $s = XML::Simple->new;
my $tree = $s->XMLin($someFile);
my $subfields = SubFields->new();
$subfields->Description ( $tree->{ImportantStuff}->{VeryImportantStuff}->{Item1}->{Description} );
print Dumper($subfields);
print Dumper($tree);
####
$VAR1 = bless({
'SubFields::Description' => undef,
'SubFields::Date' => undef,
}, 'SubFields');
$VAR1 = {
'ImportantStuff' => {
'VeryImportantStuff' => {
'Item1' => {}
}
},
},
'Stuff1' => 'Data Stuff',
'ImportantStuff' => {
'MoreStuff' => {
...
},
'VeryImportantStuff' => {
'Item1' => {
'Description' => 'Need To Know',
'Date' => '20040101',
},
'Item2' => {
...
},
'Item3' => {
...
},
},
},
};