XML, the Perl Way

HTML::TreeBuilder::XPath

HTML::TreeBuilder::XPath uses XML::XPathEngine to add XPath to HTML::TreeBuilder. If you use HTML::TreeBuilder::XPath instead of Tree::DAG_Node then you get to use methods like findnodes, as in my @nodes= $root->findnodes( '<xpath_expression>'), or findvalue, with the full power of XPath.