Aug. 22, 2005
5:43 a.m.
It appears as though creating a namespaced element using etree.SubElement(d, 'm:bar', nsmap={'m': ns}) does not work correctly, while using the etree.SubElement(d, '{ns}bar') form does. The attached script hopefully illustrates the problem, and also the way that the serialised XML is incorrect in showing an element which was created with no namespace exactly the same as an element in the default namespace (though it appears the parser picks this up correctly when reparsing the output!?). Am I misunderstanding something fundamental? Note that I tried this with both 0.7 and r16184 of the trunk. Jamie -- Artefact Publishing: http://www.artefact.org.nz/ GnuPG Public Key: http://www.artefact.org.nz/people/jamie.html