in reply to searching in document parsed by XML::Parser

from the manual:

parse(SOURCE [, OPT => OPT_VALUE [...]])

The SOURCE parameter should either be a string containing the whole XML document, or it should be an open IO::Han­dle. Constructor options to XML::Parser::Expat given as keyword-value pairs may follow the SOURCE parameter. These override, for this call, any options or attributes passed through from the XML::Parser instance.

A die call is thrown if a parse error occurs. Otherwise it will return 1 or whatever is returned from the Final han­dler, if one is installed. In other words, what parse may return depends on the style.

So, if you want a structure, use the 'Tree' STYLE, if you want handlers, use the 'Subs' STYLE.

-- Joost downtime n. The period during which a system is error-free and immune from user input.