summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-30 07:32:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-30 07:32:56 (GMT)
commit0e2d88140620973c24e7cc09bf2627298c86ef54 (patch)
tree90df979d1b4fb3d5e89cb77faaae1568aae26a20 /Lib/xml/dom
parentd1b516c274aa1502514d7b3c51f63894480560e1 (diff)
downloadcpython-0e2d88140620973c24e7cc09bf2627298c86ef54.zip
cpython-0e2d88140620973c24e7cc09bf2627298c86ef54.tar.gz
cpython-0e2d88140620973c24e7cc09bf2627298c86ef54.tar.bz2
Add xml namespace initially (PyXML 1.19).
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r--Lib/xml/dom/pulldom.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index 255689c..b2e1a46 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -21,6 +21,7 @@ class PullDOM(xml.sax.ContentHandler):
document = None
def __init__(self, documentFactory=None):
+ from xml.dom import XML_NAMESPACE
self.documentFactory = documentFactory
self.firstEvent = [None, None]
self.lastEvent = self.firstEvent
@@ -31,7 +32,7 @@ class PullDOM(xml.sax.ContentHandler):
except AttributeError:
# use class' pop instead
pass
- self._ns_contexts = [{}] # contains uri -> prefix dicts
+ self._ns_contexts = [{XML_NAMESPACE:'xml'}] # contains uri -> prefix dicts
self._current_context = self._ns_contexts[-1]
self.pending_events = []