summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-09 20:04:16 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-09 20:04:16 (GMT)
commit13a3069c2b77df9874d68b5afef97a81525b4ceb (patch)
treeca1037311b0d0e85b7f28015d1ba7cb0aec6051c /Lib/xml
parenteca576c68be8299b006251eeea0f23068520ed57 (diff)
downloadcpython-13a3069c2b77df9874d68b5afef97a81525b4ceb.zip
cpython-13a3069c2b77df9874d68b5afef97a81525b4ceb.tar.gz
cpython-13a3069c2b77df9874d68b5afef97a81525b4ceb.tar.bz2
Paul Prescod <paul@prescod.net>:
Correct the chaining between siblings.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/minidom.py7
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