[lxml-dev] About the position of html parsing by HTML Target parser
Stefan Behnel
stefan_ml at behnel.de
Mon Jul 20 10:37:25 CEST 2009
qhlonline wrote:
> 2009-07-20,"Stefan Behnel" wrote:
>> did you mean that you are actually doing a /textual/ replacement here?
>
> Yes, I think if we use the ordinary parsing mode, things may be easy.
> But my leader has used the target parser of lxml.
"leader" meaning your supervisor, I suppose? The person who gave you the task?
> It generate no DOM tree at all
Then what does it do? Any chance you could provide enough information to
actually *solve* your problem?
I'm really getting tired of pulling every little bit of required
information out of your responses myself. Keeping it that way is a sure
path towards being ignored.
> so I can't inject data to a constructed tree directly.
Can't you just transform the data inside the callback? (assuming that there
is something behind the callback that receives it...)
Normally, I would expect some kind of SAX-like event chain that receives
callbacks from the parser, transforms it in some way, and sends it
somewhere else. Then I'd modify the data along that path to include the
content I want.
Stefan
More information about the lxml-dev
mailing list