[EMAIL PROTECTED] (Randal L. Schwartz) writes:

> >>>>> "Gisle" == Gisle Aas <[EMAIL PROTECTED]> writes:
> 
> Gisle>   - XML mode.
> 
> Does this mean that XML::Parser can be *replaced* by HTML::Parser in the
> right mode?

Not really.  It just means that HTML::Parser can parse some simple XML
files that:

   - don't use DTDs
   - don't use entitity references besides those defined for HTML
   - don't use Unicode chars outside US-ASCII in tag and attribute names

XML::Parser can also build trees directly, HTML::Parser can't.  If you
are working with XML files, then HTML::Parser might be handy to do
file edits like those demonstrated by the eg/hrefsub and eg/hstrip
programs.

I have not measured the speed difference between HTML::Parser and
XML::Parser, but I think (hope) that HTML::Parser will be faster and
have a much smaller memory print.  If it is not faster than we surely
have some more code optimizations to make. :-)

Regards,
Gisle

Reply via email to