xml.sax.ContentHandler

class xml.sax.ContentHandler[source]

Interface for receiving logical document content events.

This is the main callback interface in SAX, and the one most important to applications. The order of events in this interface mirrors the order of the information in the document.

Methods

__init__()
characters(content) Receive notification of character data.
endDocument() Receive notification of the end of a document.
endElement(name) Signals the end of an element in non-namespace mode.
endElementNS(name, qname) Signals the end of an element in namespace mode.
endPrefixMapping(prefix) End the scope of a prefix-URI mapping.
ignorableWhitespace(whitespace) Receive notification of ignorable whitespace in element content.
processingInstruction(target, data) Receive notification of a processing instruction.
setDocumentLocator(locator) Called by the parser to give the application a locator for locating the origin of document events.
skippedEntity(name) Receive notification of a skipped entity.
startDocument() Receive notification of the beginning of a document.
startElement(name, attrs) Signals the start of an element in non-namespace mode.
startElementNS(name, qname, attrs) Signals the start of an element in namespace mode.
startPrefixMapping(prefix, uri) Begin the scope of a prefix-URI Namespace mapping.