in reply to Re: More with XML Parser
in thread More with XML Parser

Yeah, the Tree style is kind of icky, I think. :)

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.

use XML::Simple; my $xml = XMLin("foo.xml"); use Data::Dumper; print Dumper $xml;
For your particular example, I got these results:
$VAR1 = { 'inside' => { 'name' => 'Wibble', 'content' => 'some data' } };
So you could get the contents of name like this:
my $name = $xml->{'inside'}{'name'};