Comparison to Other Modules
HTML Tree is very similar to
the HTML::Parser and HTML::TreeBuilder Perl modules
by Gisle Aas and Michael Chase,
except that it:
-
Is several times faster.
HTML Tree owes its speed to two things:
using mmap(2) to read the HTML file bypassing conventional I/O and buffering,
and being written entirely in C++ as opposed to Perl.
-
Isn't a strict DTD (Document Type Definition) parser.
The goal is to parse HTML files fast,
not check for validity.
(You should check the validity of your HTML files with other tools before
you put them on your web site anyway.)
HTML Tree couldn't care less what attributes a given HTML element has
just so long as the syntax is correct.
This is actually similar to browsers in that both are very permissive
in what they accept.
-
Offers simple conditional and looping mechanisms
assisting in the generation of dynamic content.
|