handle <BR> tags

Carl Banks imbosol at aerojockey.com
Fri Aug 1 01:17:47 CEST 2003

Luca Calderano wrote:
> Hi guys...
> I've done a subclass of SGMLParser 
> to handle the contents of a web page,
> but i'm not able to handle the <BR> tag
> can someone help me???

I'm very familiar with sgmllib.  Can you describe the problem you're

If you are using <br> as a self-closing tag as is done in XHTML (i.e.,
<br/>), then this cannot be done with sgmllib.  You should use
HTMLParser instead--only you might have to make some minor changes to
your code.


More information about the Python-list mailing list