The new library HTML::DOMbo allows converting between XML::DOM trees and
{XML/HTML}::Element trees. My main impetus was in allowing anyone most familiar with
DOM to use HTML::TreeBuilder trees, by providing for making a DOM copy of an
HTML::TreeBuilder tree. But then I thought, if they can go one way, why not the
other? So I added the somewhat more experimental methods for going the other way.
And in the process of writing this, I finally had to actually learn a bit about DOM.
It didn't kill me, and I don't think it made be stronger, but it did make me sleep
until 2pm the next day.
NAME
HTML::DOMbo -- convert between XML::DOM and {XML/HTML}::Element trees
SYNOPSIS
use HTML::DOMbo;
use HTML::TreeBuilder;
my $tree = HTML::TreeBuilder->new;
$tree->parse_from_file('foo.html');
my $dom_tree = $tree->to_XML_DOM;
# Now you have an XML::DOM element tree in $dom_tree!
DESCRIPTION
This class puts a method into HTML::Element called `to_XML_DOM',
and puts into the class XML::DOM::Node two methods,
`to_HTML_Element' and `to_XML_Element'.
[...]
--
Sean M. Burke [EMAIL PROTECTED] http://www.spinn.net/~sburke/