SGMLParser error on HTML comment

Marcel van den Dungen m.vandendungen at NOSPAMc-content.nl
Mon May 28 05:17:12 EDT 2001


Hi,

I'm trying to parse a bunch of HTML files using the SGMLParser class,
which works just fine unless an HTML-file starts with an HTML-comment
marker before the <HTML> opening-tag.
The following error is emited:
  File "c:\python21\lib\sgmllib.py", line 238, in parse_declaration
    raise SGMLParseError(
sgmllib.SGMLParseError: unexpected char in declaration: '<'

Anybody know a fix or workaround for this?

TIA,
Marcel





More information about the Python-list mailing list