Using cElementTree and elementtree.ElementInclude

Fredrik Lundh fredrik at pythonware.com
Sat Oct 21 02:29:08 EDT 2006


Mark wrote:

> I have an elementtree created with cElementTree. I then use 
> ElementInclude to resolve some xinclude elements. But then I want to 
> move those included elements to be children of the root
> 
> root.append(included_child)
> 
> but I get an error message
> 
> TypeError: 'append() argument 1 must be Element, not instance'

cElementTree cannot hold ElementTree instances.

can you post a small but self-contained example showing how you got this 
error?

</F>




More information about the Python-list mailing list