<DIV><BR>&nbsp;</DIV><PRE>2009-07-20,"Stefan Behnel" &lt;stefan_ml@behnel.de&gt; :
&gt;
&gt;qhlonline wrote:
&gt;&gt; 2009-07-17,"Stefan Behnel" wrote:
&gt;&gt;&gt; That said, I still do not understand why you need the character stream
&gt;&gt;&gt; position for parsing. Could you elaborate on that?
&gt;&gt;
&gt;&gt; Well, the position information is usefull. Some outside source of HTML
&gt;&gt; document is declared in a seperate file, like &lt;style&gt; 'css' file. We may
&gt;&gt; get the HTML document and its related source on net concurrently. But
&gt;&gt; the outside source should be inserted in the proper position of HTML
&gt;&gt; document in out application after parse. so the related tag position is
&gt;&gt; usefull now.
&gt;
&gt;I still don't understand what you need the stream position for. If you want
&gt;to inject data into the tree, just find the right element and do so.
&gt;
&gt;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. 
&gt;
&gt;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>