HTMLParser and Quotes

Richard Brodie R.Brodie at rl.ac.uk
Thu Jan 2 13:35:57 CET 2003


"Richard West" <rwest2 at opti.cgi.net> wrote in message
news:qpj71v0as06msdmoj6nep17dptnvtqlml6 at 4ax.com...

> The face should obviously have quotes around its value, but under the
> circumstances I would think HTMLParser should take anything up until
> the next space or end of the tag as its value.

HTMLParser is a fairly straightforward parser: it mostly follows the SGML
syntax rules. That means that it is of little use for most of the HTML out on
the web. Whilst an DWIM parser might be useful, it could get out of hand,
and I'm fairly happy that the standard library one stops on the first error.
In a few years the XML ones will error anyway.






More information about the Python-list mailing list