Using cElementTree and elementtree.ElementInclude

Mark mesmith.15507218 at bloglines.com
Fri Oct 20 17:38:28 EDT 2006


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'


The type of included_child is 'instance'. The type of the cElementTree 
children is 'Element'. How do I resolve this conflict? I am using 
cElementTree version 1.0.3 and elementtree version 1.2.6 and python 
version 2.3.4. Will later versions correct the problem?

Thanks,
Mark



More information about the Python-list mailing list