On Mon, Apr 28, 2003 at 10:33:15PM +0800, Yuedong Du wrote:Hi all, I have be puzzled by the problem for serveral days. How to insert another pieces of html snippet into the process of html parsing? When parsing html document ,we call htmlParseChunk() and a dom tree is built, Now we meet the _javascript_ document.write("..."). So the content need to break the current parsing stream.I don't understand. Seems to me you are trying to mix layers, and I don't understand the rationale nor the constraints of your approach. The HTML parser, parse HTML. It does not parse _javascript_, nor try to interpret the content of the entity being parsed. It is not designed to mix those two layers. Daniel