HTMLParser tag contents

Oleg Broytmann phd at phd.russ.ru
Fri May 5 10:37:32 EDT 2000


On Sat, 6 May 2000, Grant Griffin wrote:
> I've been trying to figure out how to use HTMLParser.  My immediate need
> is to extract the entire <BODY> of a file.  (I could do that with 're',
> but I'm trying to learn HTMLParser.)  Sure, HTMLParser will returns a
> tag's _attributes_, but I can't figure out how to get to the tag's
> _contents_.  Can it do that?

   Do not use HTMLParser - use SGMLParser. HTMLParser is for different
parsing - more for HTML-to-text conversions...

Oleg.            (All opinions are mine and not of my employer)
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list