OK, I'll bite ;--)
As usual with XML you have 3 options:
- use a module that loads the document in memory and then find the one you want, most likely using XPath (you might need to build the XPath query from the "specific search criteria" you mentionned). XML::LibXML is probably your best bet, it is the most powerful and fastest of the lot,
- use a module that processes the XML stream, XML::Parser
or, better XML::SAX (better because the SAX interface is a standard, it is actually LESS powerful than XML::Parser's interface, also there are a good number of SAX based modules that can make your life easier, such as XML::SAX::Machines). In this case you will have to build the code that finds the node you are looking for, and of course you will be limited by the streaming nature of the process (no lookahead unless you code it, need to manage the context to figure out the ancestors/previous siblings of the current node). In short, a big PITA ;--)
- XML::Twig (totally biased advice here ;--) finally, will let you use an XPath-inspired language to filter the input, and find the node you want. In this case also you are limited by the streaming nature of the filtering, although probably less than with a pure SAX module (you can also load the entire document in memory, and use XPath expressions to find the node you want).
The use of XPath will really make your work much easier, so you should really forget about the XML::Simple/XML::Smart family (and also about the SAX stuff IMHO), and try XML::LibXML or XML::Twig.
Does this help?