Perl parser that builds a tree of XML::Element objects