diff options
Diffstat (limited to 'Lib/xml')
-rw-r--r-- | Lib/xml/dom/minidom.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index 3ed7236..6dc3a52 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -102,6 +102,13 @@ class Node: newChild.parentNode = self def appendChild(self, node): + if self.childNodes: + last = self.lastChild + node.previousSibling = last + last.nextSibling = node + else: + node.previousSibling = None + node.nextSibling = None self.childNodes.append(node) return node |