From 0e2d88140620973c24e7cc09bf2627298c86ef54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 30 Jun 2002 07:32:56 +0000 Subject: Add xml namespace initially (PyXML 1.19). --- Lib/xml/dom/pulldom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = [] -- cgit v0.12