30 Jun
2008
30 Jun
'08
8:28 p.m.
On Mon, 2008-06-30 at 20:11 +0000, Eric Jahn wrote:
...The second odd behavior is that, for subelements, all the namespace declarations are automatically redeclared in the subelement tag, which is redundant.
I see that this second error goes away when I use child1 = etree.SubElement(root,NS2 + "secondelement", nsmap=NSMAP, type = NS2 + "someattribute") instead of root = etree.Element(NS1 + "firstelement", nsmap=NSMAP) element = etree.Element(NS2 + "secondelement", nsmap=NSMAP, type = NS2 + "someattribute") root.append(element) -Eric