summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2000-09-21 08:18:55 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2000-09-21 08:18:55 (GMT)
commitb4d6bb098776de48275c2e422c608ddfd85f4198 (patch)
tree90de5d83e82e1eefe12c58b061e7ca1929128b9f /Lib/xml/sax
parent39fb28f75967999d3223d3c88ab30c4341c48330 (diff)
downloadcpython-b4d6bb098776de48275c2e422c608ddfd85f4198.zip
cpython-b4d6bb098776de48275c2e422c608ddfd85f4198.tar.gz
cpython-b4d6bb098776de48275c2e422c608ddfd85f4198.tar.bz2
Updated to correct DocumentHandler signatures. (patch 101570)
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r--Lib/xml/sax/handler.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/Lib/xml/sax/handler.py b/Lib/xml/sax/handler.py
index 27b19f9..64daf2e 100644
--- a/Lib/xml/sax/handler.py
+++ b/Lib/xml/sax/handler.py
@@ -10,12 +10,15 @@ $Id$
"""
version = '2.0beta'
+
#============================================================================
#
# HANDLER INTERFACES
#
#============================================================================
+
# ===== ErrorHandler =====
+
class ErrorHandler:
"""Basic interface for SAX error handlers. If you create an object
that implements this interface, then register the object with your
@@ -119,20 +122,34 @@ class ContentHandler:
of endPrefixMapping events is not otherwise guaranteed."""
def startElement(self, name, attrs):
- """Signals the start of an element.
+ """Signals the start of an element in non-namespace mode.
+
+ The name parameter contains the raw XML 1.0 name of the
+ element type as a string and the attrs parameter holds an
+ instance of the Attributes class containing the attributes of
+ the element."""
+
+ def endElement(self, name):
+ """Signals the end of an element in non-namespace mode.
+
+ The name parameter contains the name of the element type, just
+ as with the startElement event."""
+
+ def startElementNS(self, name, qname, attrs):
+ """Signals the start of an element in namespace mode.
The name parameter contains the name of the element type as a
- (uri ,localname) tuple, the qname parameter the raw XML 1.0
+ (uri, localname) tuple, the qname parameter the raw XML 1.0
name used in the source document, and the attrs parameter
holds an instance of the Attributes class containing the
attributes of the element."""
- def endElement(self, name ):
- """Signals the end of an element.
+ def endElementNS(self, name, qname):
+ """Signals the end of an element in namespace mode.
The name parameter contains the name of the element type, just
- as with the startElement event."""
-
+ as with the startElementNS event."""
+
def characters(self, content):
"""Receive notification of character data.