[lxml-dev] About the position of html parsing by HTML Target parser

Stefan Behnel stefan_ml at behnel.de
Thu Jul 16 16:53:00 CEST 2009


qhlonline wrote:
> Hi, all I am parsing html files with lxml target parser, now I wan't to
> know when I have reached some HTML tag, how can I know the position of
> the HTML document I am parsing?

These are two different requirements. Do you really need the line/character
information here? Isn't the structural position enough?


> Is there any callbacks in target parser
> who can tell me the total stream length I have parsed?

Not that I know of. Same as in ElementTree, I'd say.

Stefan


More information about the lxml-dev mailing list