lxml/ElementTree and .tail

Fredrik Lundh fredrik at pythonware.com
Thu Nov 16 09:05:18 CET 2006


Stefan Behnel wrote:

> If you want to copy part of of removed element back into the tree, feel free
> to do so.

and that can of course be done with a short helper function.

when removing elements from trees, I often set the tag for those 
elements to some "garbage" value during processing, and then call 
something like

http://effbot.org/zone/element-bits-and-pieces.htm#cleanup

to clean things up before serializing the tree.

</F>




More information about the Python-list mailing list