New submission from Jean-Paul Calderone <exar...@divmod.com>: In order to create an element with an attribute and a child, this is necessary:
e = Element("foo") e.setAttribute("bar", "baz") e.appendChild(quux) It would be preferable if Element.__init__ accepted two additional parameters to shorten this: e = Element("foo", attributes={"bar": "baz"}, children=[quux]) It may also be preferable to have a third new parameter, attributesNS, to parallel the Element.setAttributeNS method. This would accept a dict mapping namespaceURI and qualifiedName to an attribute value. ---------- components: Library (Lib) messages: 79183 nosy: exarkun severity: normal status: open title: instantiating and populating xml.dom.minidom.Element is cumbersome type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4849> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com