xml.sax.handler.ContentHandler.endElement()

ContentHandler.endElement(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.

xml.sax.handler.ContentHandler.endDocument()

ContentHandler.endDocument() Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

xml.sax.handler.ContentHandler.characters()

ContentHandler.characters(content) Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information. content may be a string or bytes instance; the expat reader module always produces strings. N

xml.sax.handler.ContentHandler

class xml.sax.handler.ContentHandler 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.

xml.sax.handler.all_properties

xml.sax.handler.all_properties List of all known property names.

xml.sax.handler.all_features

xml.sax.handler.all_features List of all features.

xml.parsers.expat.XMLParserType

xml.parsers.expat.XMLParserType The type of the return values from the ParserCreate() function.

xml.parsers.expat.xmlparser.XmlDeclHandler()

xmlparser.XmlDeclHandler(version, encoding, standalone) Called when the XML declaration is parsed. The XML declaration is the (optional) declaration of the applicable version of the XML recommendation, the encoding of the document text, and an optional “standalone” declaration. version and encoding will be strings, and standalone will be 1 if the document is declared standalone, 0 if it is declared not to be standalone, or -1 if the standalone clause was omitted. This is only available with

xml.parsers.expat.xmlparser.UseForeignDTD()

xmlparser.UseForeignDTD([flag]) Calling this with a true value for flag (the default) will cause Expat to call the ExternalEntityRefHandler with None for all arguments to allow an alternate DTD to be loaded. If the document does not contain a document type declaration, the ExternalEntityRefHandler will still be called, but the StartDoctypeDeclHandler and EndDoctypeDeclHandler will not be called. Passing a false value for flag will cancel a previous call that passed a true value, but otherwis

xml.parsers.expat.xmlparser.UnparsedEntityDeclHandler()

xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName) Called for unparsed (NDATA) entity declarations. This is only present for version 1.2 of the Expat library; for more recent versions, use EntityDeclHandler instead. (The underlying function in the Expat library has been declared obsolete.)