in reply to How to find an xpath from an web page
What's wrong with using HTML::TreeBuilder::XPath? You pass it the XPath query and it returns you the matched nodes.