The Perl 5 module HTML::TreeBuilder::XPath adds typical XPath methods to HTML::TreeBuilder, to make it easy to query a document.