[XML-SIG] How does one process HTML with the DOM support in PyXML?

Fred L. Drake, Jr. fdrake@acm.org
Tue, 12 Jun 2001 23:31:07 -0400 (EDT)


Bill Janssen writes:
 > Well, it's "HTML as deployed" but also "Python as deployed", so I need
 > something that's backward-compatible to 1.5.2, I think.  It looks like
 > DOM will give me some of that; I'm not sure how well it copes with
 > 'loose' HTML, but so far it looks good.

  You could certainly use HTMLParser to build a DOM builder, or write
a SAX driver on top of it.  Which makes sense depends on your
application.

 > I'm looking for a faster (and cleaner) upgrade from sgmllib.SGMLParser.

  I think HTMLParser fits this bill nicely.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations