Well, rather than reinventing the wheel, since
XML::Simple is written totally in perl, you can just include it by adjusting your
@INC to include it, rather than installing it into the normal search path.
Failing that, you should be able to parse similarly to
XML::Simple using
XML::Parser's neat
Tree style.
use XML::Parser;
$p1 = new XML::Parser(Style=> 'Tree');
my $xml = $p1->parsefile('foo.xml');
use Data::Dumper;
print Dumper($xml);
Granted, though, I haven't checked this code yet.. ;-)