in reply to Re: More with XML Parser
in thread More with XML Parser
To the OP: if your XML file is pretty simple, you should try using XML::Simple. It loads your data into a nice hash-of-hashes tree.
For your particular example, I got these results:use XML::Simple; my $xml = XMLin("foo.xml"); use Data::Dumper; print Dumper $xml;
So you could get the contents of name like this:$VAR1 = { 'inside' => { 'name' => 'Wibble', 'content' => 'some data' } };
my $name = $xml->{'inside'}{'name'};
|
|---|