[lxml-dev] About lxml Target parser

Stefan Behnel stefan_ml at behnel.de
Thu Jul 16 16:56:06 CEST 2009


qhlonline wrote:
> I have read part of the source file Saxparser.pxi, May be the two
> classes named _SaxParserTarget and _SaxParserContext have close
> relationship with Target Parser.

Yes, they are (somewhat) related.


> A function _handleSaxData has been
> defined to deal with HTML data part. But why the data returned is only
> the text part between tags?

Because that's how the SAX interface is defined (and how XML defines text
content, BTW).


> I wan't to know how much characters of the
> HTML file have been parsed with the target parser, when a
> "start_element" event comes.

I replied in your other thread about the same topic.

Stefan


More information about the lxml-dev mailing list