XML, the Perl Way


HTML::TreeBuilder::toSAX subclasses HTML::TreeBuilder to allow it to export a SAX stream. It mostly adds 2 methods to HTML::TreeBuilder: toSAX1 and toSAX2, which take a SAX handler as argument. Elements in the tree are also subclassed as HTML::Element::toSAX objects and can also be exported as SAX streams, usong the same methods.