in reply to Help with XML Parsing
If your criteria can be expressed using XPath, then you might be able to use xml_grep2, a tool based on XML::LibXML that you can find at http://xmltwig.com/tool/.
And of course XML::Twig comes with its own xml_grep.