Users are expected to subclass ContentHandler to support their application. The following methods are called by the parser on the appropriate events in the input document:
http://xml.org/sax/features/namespaces feature is true (the
default).
There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each-other: all startPrefixMapping() events will occur before the corresponding startElement event, and all endPrefixMapping() events will occur after the corresponding endElement() event, but their order is not guaranteed.
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.
The name parameter contains the name of the element type, just as with the startElement event.
The name parameter contains the name of the element type as a (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 AttributesNS class containing the attributes of the element.
Parsers may set the qname parameter to None, unless the
http://xml.org/sax/features/namespace-prefixes feature is
activated.
The name parameter contains the name of the element type, just as with the startElementNS event, likewise the qname parameter.
content may be a Unicode string or a byte string; the
expat reader module produces always Unicode strings.
A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities properties.