HTML-Tree
HTML-Tree is a suite of Perl modules for making parse trees out of HTML source. It consists of mainly two modules, HTML-TreeBuilder and HTML-Element.
HTML-TreeBuilder is the module that builds the parse trees. (It uses HTML-Parser to do the work of breaking the HTML up into tokens.) The tree that TreeBuilder builds for you is made up of objects of the class HTML-Element.
For more information on Perl, see perl.com or perl.org.