xml.parsers.expat.xmlparser.ordered_attributes

xmlparser.ordered_attributes Setting this attribute to a non-zero integer causes the attributes to be reported as a list rather than a dictionary. The attributes are presented in the order found in the document text. For each attribute, two list entries are presented: the attribute name and the attribute value. (Older versions of this module also used this format.) By default, this attribute is false; it may be changed at any time.

xml.parsers.expat.xmlparser.NotStandaloneHandler()

xmlparser.NotStandaloneHandler() Called if the XML document hasn’t been declared as being a standalone document. This happens when there is an external subset or a reference to a parameter entity, but the XML declaration does not set standalone to yes in an XML declaration. If this handler returns 0, then the parser will raise an XML_ERROR_NOT_STANDALONE error. If this handler is not set, no exception is raised by the parser for this condition.

xml.parsers.expat.xmlparser.NotationDeclHandler()

xmlparser.NotationDeclHandler(notationName, base, systemId, publicId) Called for notation declarations. notationName, base, and systemId, and publicId are strings if given. If the public identifier is omitted, publicId will be None.

xml.parsers.expat.xmlparser.GetInputContext()

xmlparser.GetInputContext() Returns the input data that generated the current event as a string. The data is in the encoding of the entity which contains the text. When called while an event handler is not active, the return value is None.

xml.parsers.expat.xmlparser.GetBase()

xmlparser.GetBase() Returns a string containing the base set by a previous call to SetBase(), or None if SetBase() hasn’t been called.

xml.parsers.expat.xmlparser.ExternalEntityRefHandler()

xmlparser.ExternalEntityRefHandler(context, base, systemId, publicId) Called for references to external entities. base is the current base, as set by a previous call to SetBase(). The public and system identifiers, systemId and publicId, are strings if given; if the public identifier is not given, publicId will be None. The context value is opaque and should only be used as described below. For external entities to be parsed, this handler must be implemented. It is responsible for creating t

xml.parsers.expat.xmlparser.ExternalEntityParserCreate()

xmlparser.ExternalEntityParserCreate(context[, encoding]) Create a “child” parser which can be used to parse an external parsed entity referred to by content parsed by the parent parser. The context parameter should be the string passed to the ExternalEntityRefHandler() handler function, described below. The child parser is created with the ordered_attributes and specified_attributes set to the values of this parser.

xml.parsers.expat.xmlparser.ErrorLineNumber

xmlparser.ErrorLineNumber Line number at which an error occurred.

xml.parsers.expat.xmlparser.ErrorColumnNumber

xmlparser.ErrorColumnNumber Column number at which an error occurred.

xml.parsers.expat.xmlparser.ErrorCode

xmlparser.ErrorCode Numeric code specifying the problem. This value can be passed to the ErrorString() function, or compared to one of the constants defined in the errors object.