summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2000-09-29 19:00:40 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2000-09-29 19:00:40 (GMT)
commit3f0969f100a565a239f3504b50ab8e31d6e81b14 (patch)
treeccda7a187da50102f48ca874e3effa6b4afece12 /Lib/xml
parent491ded78ccd2b1fff10090e4d11ef42a9732bfdd (diff)
downloadcpython-3f0969f100a565a239f3504b50ab8e31d6e81b14.zip
cpython-3f0969f100a565a239f3504b50ab8e31d6e81b14.tar.gz
cpython-3f0969f100a565a239f3504b50ab8e31d6e81b14.tar.bz2
Use string functions instead of methods to allow sharing this module with PyXML
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/sax/expatreader.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index 22de342..2fc2b7c 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -12,6 +12,8 @@ from xml.sax import xmlreader, saxutils, handler
AttributesImpl = xmlreader.AttributesImpl
AttributesNSImpl = xmlreader.AttributesNSImpl
+import string
+
# --- ExpatParser
class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
@@ -133,13 +135,13 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
self._cont_handler.endElement(name)
def start_element_ns(self, name, attrs):
- pair = name.split()
+ pair = string.split(name)
if len(pair) == 1:
pair = (None, name)
newattrs = {}
for (aname, value) in attrs.items():
- apair = aname.split()
+ apair = string.split(aname)
if len(apair) == 1:
apair = (None, aname)
else:
@@ -151,7 +153,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
AttributesNSImpl(newattrs, {}))
def end_element_ns(self, name):
- pair = name.split()
+ pair = string.split(name)
if len(pair) == 1:
pair = (None, name)