<DIV><BR> </DIV><PRE>2009-07-20,"Stefan Behnel" <stefan_ml@behnel.de> :
>
>qhlonline wrote:
>> 2009-07-17,"Stefan Behnel" wrote:
>>> That said, I still do not understand why you need the character stream
>>> position for parsing. Could you elaborate on that?
>>
>> Well, the position information is usefull. Some outside source of HTML
>> document is declared in a seperate file, like <style> 'css' file. We may
>> get the HTML document and its related source on net concurrently. But
>> the outside source should be inserted in the proper position of HTML
>> document in out application after parse. so the related tag position is
>> usefull now.
>
>I still don't understand what you need the stream position for. If you want
>to inject data into the tree, just find the right element and do so.
>
>Or did you mean that you are actually doing a /textual/ replacement here?</PRE><PRE>Yes, I think if we use the ordinary parsing mode, things may be easy. But my leader has used the target parser of lxml. It generate no DOM tree at all, so I can't inject data to a constructed tree directly.
>
>Stefan
</PRE><br><!-- footer --><br><span title="neteasefooter"/><hr/>
<a href="http://count.mail.163.com/redirect/footer.htm?f=http://gouwu.youdao.com">200万种商品,最低价格,疯狂诱惑你</a>
</span>