summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2000-09-24 18:31:37 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2000-09-24 18:31:37 (GMT)
commite84bf751bb0d18851877518dbb6d382f909f16b4 (patch)
tree02c6955e08cc2ef48f8c0175c8f6a8780455d473 /Lib/xml/dom
parentf43cf31f4a60091af8b2146f4589be53a6d76b8c (diff)
downloadcpython-e84bf751bb0d18851877518dbb6d382f909f16b4.zip
cpython-e84bf751bb0d18851877518dbb6d382f909f16b4.tar.gz
cpython-e84bf751bb0d18851877518dbb6d382f909f16b4.tar.bz2
Updated to new SAX method signatures (*NS, patch 101573).
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r--Lib/xml/dom/pulldom.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index 011d46a..38b2abe 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -1,7 +1,7 @@
import minidom
import xml.sax
-#todo: SAX2/namespace handling
+#todo: namespace handling
START_ELEMENT = "START_ELEMENT"
END_ELEMENT = "END_ELEMENT"
@@ -19,13 +19,13 @@ class PullDOM:
def setDocumentLocator(self, locator): pass
- def startElement(self, name, tagName, attrs):
+ def startElement(self, name, attrs):
if not hasattr(self, "curNode"):
# FIXME: hack!
self.startDocument()
- node = self.document.createElement(tagName) #FIXME namespaces!
- for attr in attrs.keys():
+ node = self.document.createElement(name)
+ for (attr, value) in attrs.items():
node.setAttribute(attr, attrs[attr])
parent = self.curNode
@@ -34,12 +34,12 @@ class PullDOM:
node.previousSibling = parent.childNodes[-1]
node.previousSibling.nextSibling = node
self.curNode = node
- # FIXME: do I have to screen namespace attributes
+
self.lastEvent[1] = [(START_ELEMENT, node), None]
self.lastEvent = self.lastEvent[1]
#self.events.append((START_ELEMENT, node))
- def endElement(self, name, tagName):
+ def endElement(self, name):
node = self.curNode
self.lastEvent[1] = [(END_ELEMENT, node), None]
self.lastEvent = self.lastEvent[1]