HTMLParser tag contents
Oleg Broytmann
phd at phd.russ.ru
Sat May 6 04:06:24 EDT 2000
On 5 May 2000, Grant Griffin wrote:
> Perhaps I misspoke. I agree that the solution would probably have to occur at
> the level of SGMLParser, but I guess my question remains: can it do that? if so,
> how?
>
> In looking at the SGMLParser source code, it doesn't appear to have any
> mechanism to capture the contents of a tag.
You cannot "just do it" :) You need to write a class inhertied from
SGMLParser, define the methods for capturing <BODY> and from this point
forward capture ALL text and ALL tags until </BODY>.
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