diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py index d7280ee89a6..d71f6dfcb30 100644 --- a/Lib/xml/dom/pulldom.py +++ b/Lib/xml/dom/pulldom.py @@ -83,10 +83,11 @@ def startElementNS(self, name, tagName , attrs): else: qname = a_localname attr = self.document.createAttributeNS(a_uri, qname) + node.setAttributeNodeNS(attr) else: attr = self.document.createAttribute(a_localname) + node.setAttributeNode(attr) attr.value = value - node.setAttributeNode(attr) self.lastEvent[1] = [(START_ELEMENT, node), None] self.lastEvent = self.lastEvent[1]