summaryrefslogtreecommitdiff
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-30 07:38:50 +0000
committerMartin v. Löwis <martin@v.loewis.de>2002-06-30 07:38:50 +0000
commit99b977f2e5a63a49e7d88625e5cc35a79b69318d (patch)
treeae40f1386ce1fe0e7bd61f8058cb26ca62aaf54c /Lib/xml/sax
parentef46f7c82bf8953fedc83c9a7b28cd295ef158bc (diff)
downloadcpython-99b977f2e5a63a49e7d88625e5cc35a79b69318d.tar.gz
Merge from PyXML:
[1.3] Added documentation of the namespace URI for elements with no namespace. [1.4] New property http://www.python.org/sax/properties/encoding. [1.5] Support optional string interning in pyexpat.
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r--Lib/xml/sax/handler.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/Lib/xml/sax/handler.py b/Lib/xml/sax/handler.py
index aa08d99992..41105c0cee 100644
--- a/Lib/xml/sax/handler.py
+++ b/Lib/xml/sax/handler.py
@@ -144,7 +144,10 @@ class ContentHandler:
(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."""
+ attributes of the element.
+
+ The uri part of the name tuple is None for elements which have
+ no namespace."""
def endElementNS(self, name, qname):
"""Signals the end of an element in namespace mode.
@@ -315,7 +318,28 @@ property_xml_string = "http://xml.org/sax/properties/xml-string"
# the current event.
# access: read-only
+property_encoding = "http://www.python.org/sax/properties/encoding"
+# data type: String
+# description: The name of the encoding to assume for input data.
+# access: write: set the encoding, e.g. established by a higher-level
+# protocol. May change during parsing (e.g. after
+# processing a META tag)
+# read: return the current encoding (possibly established through
+# auto-detection.
+# initial value: UTF-8
+#
+
+property_interning_dict = "http://www.python.org/sax/properties/interning-dict"
+# data type: Dictionary
+# description: The dictionary used to intern common strings in the document
+# access: write: Request that the parser uses a specific dictionary, to
+# allow interning across different documents
+# read: return the current interning dictionary, or None
+#
+
all_properties = [property_lexical_handler,
property_dom_node,
property_declaration_handler,
- property_xml_string]
+ property_xml_string,
+ property_encoding,
+ property_interning_dict]