"<!" in SGMLParser - an error ?

David Eppstein eppstein at ics.uci.edu
Mon Nov 12 17:14:05 EST 2001


In article <uherzzlsi.fsf at ctwd0143.fitlinxx.com>,
 David Bolen <db3l at fitlinxx.com> wrote:

> However, if you mean that today's browsers are often capable of parsing 
> malformed HTML and thus people get away with invalid HTML in web pages, 
> I'd agree.

Yes, that's what I mean.

> But that's not the same as saying that HTML implies errors in the 
> documents from an SGML perspective.  Such errors should imply that it 
> wasn't valid HTML either.

Sure.  But if you want to parse HTML that you don't control, you are going 
to have to be ready to handle invalid input and do something reasonable 
with it.
-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list