in reply to Re^6: Hypertree from HTML file
in thread Hypertree from HTML file

Then I believe you'll have to use the HTML-Tree cpan module which parses a html document to a tree object. You'll also need some xml module if you want to write an xml output.

Alternately, just use some xhtml tidier, pretending the html is bad xhtml.