If you want to access the document content you might be better off using one of the modules built on top of XML::Parser:
- XML::Simple will work nicely if your XML represents data (it does not process mixed content properly),
- XML::DOM is a little dangerous to use IMHO, but if you know the DOM it can be an option,
- XML::XPath is very nice, it allows you to use XPath expressions to retrieve information from the document,
- XML::Twig of course is always a wise choice (I am a little biaised there ;--).
You can also use a module not based on XML::Parser. XML::libXML for example builds a DOM, and allows you to use XPath to query the document.