💾 Archived View for tris.fyi › pydoc › xml.parsers.expat captured on 2022-03-01 at 16:11:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

➡️ Next capture (2022-04-28)

🚧 View Differences

-=-=-=-=-=-=-

Back to module index

Go to module by name

xml.parsers

xml

xml.parsers.expat

Interface to the Expat non-validating XML parser.

Classes

ExpatError

with_traceback(...)

  Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>

xmlparser

XML parser
ExternalEntityParserCreate(...)

  Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.
GetBase(self, /)

  Return base URL string for the parser.
GetInputContext(self, /)

  Return the untranslated text of the input that caused the current event.

  If the event was generated by a large amount of text (such as a start tag
  for an element with many attributes), not all of the text may be available.
Parse(self, data, isfinal=False, /)

  Parse XML data.

  `isfinal' should be true at end of input.
ParseFile(self, file, /)

  Parse XML data from file-like object.
SetBase(self, base, /)

  Set the base URL for the parser.
SetParamEntityParsing(self, flag, /)

  Controls parsing of parameter entities (including the external DTD subset).

  Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,
  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and
  XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag
  was successful.
UseForeignDTD(self, flag=True, /)

  Allows the application to provide an artificial external subset if one is not specified as part of the document instance.

  This readily allows the use of a 'default' document type controlled by the
  application, while still getting the advantage of providing document type
  information to the parser. 'flag' defaults to True if not provided.
AttlistDeclHandler = <attribute 'AttlistDeclHandler' of 'pyexpat.xmlparser' objects>
CharacterDataHandler = <attribute 'CharacterDataHandler' of 'pyexpat.xmlparser' objects>
CommentHandler = <attribute 'CommentHandler' of 'pyexpat.xmlparser' objects>
CurrentByteIndex = <attribute 'CurrentByteIndex' of 'pyexpat.xmlparser' objects>
CurrentColumnNumber = <attribute 'CurrentColumnNumber' of 'pyexpat.xmlparser' objects>
CurrentLineNumber = <attribute 'CurrentLineNumber' of 'pyexpat.xmlparser' objects>
DefaultHandler = <attribute 'DefaultHandler' of 'pyexpat.xmlparser' objects>
DefaultHandlerExpand = <attribute 'DefaultHandlerExpand' of 'pyexpat.xmlparser' objects>
ElementDeclHandler = <attribute 'ElementDeclHandler' of 'pyexpat.xmlparser' objects>
EndCdataSectionHandler = <attribute 'EndCdataSectionHandler' of 'pyexpat.xmlparser' objects>
EndDoctypeDeclHandler = <attribute 'EndDoctypeDeclHandler' of 'pyexpat.xmlparser' objects>
EndElementHandler = <attribute 'EndElementHandler' of 'pyexpat.xmlparser' objects>
EndNamespaceDeclHandler = <attribute 'EndNamespaceDeclHandler' of 'pyexpat.xmlparser' objects>
EntityDeclHandler = <attribute 'EntityDeclHandler' of 'pyexpat.xmlparser' objects>
ErrorByteIndex = <attribute 'ErrorByteIndex' of 'pyexpat.xmlparser' objects>
ErrorCode = <attribute 'ErrorCode' of 'pyexpat.xmlparser' objects>
ErrorColumnNumber = <attribute 'ErrorColumnNumber' of 'pyexpat.xmlparser' objects>
ErrorLineNumber = <attribute 'ErrorLineNumber' of 'pyexpat.xmlparser' objects>
ExternalEntityRefHandler = <attribute 'ExternalEntityRefHandler' of 'pyexpat.xmlparser' objects>
NotStandaloneHandler = <attribute 'NotStandaloneHandler' of 'pyexpat.xmlparser' objects>
NotationDeclHandler = <attribute 'NotationDeclHandler' of 'pyexpat.xmlparser' objects>
ProcessingInstructionHandler = <attribute 'ProcessingInstructionHandler' of 'pyexpat.xmlparser' objects>
SkippedEntityHandler = <attribute 'SkippedEntityHandler' of 'pyexpat.xmlparser' objects>
StartCdataSectionHandler = <attribute 'StartCdataSectionHandler' of 'pyexpat.xmlparser' objects>
StartDoctypeDeclHandler = <attribute 'StartDoctypeDeclHandler' of 'pyexpat.xmlparser' objects>
StartElementHandler = <attribute 'StartElementHandler' of 'pyexpat.xmlparser' objects>
StartNamespaceDeclHandler = <attribute 'StartNamespaceDeclHandler' of 'pyexpat.xmlparser' objects>
UnparsedEntityDeclHandler = <attribute 'UnparsedEntityDeclHandler' of 'pyexpat.xmlparser' objects>
XmlDeclHandler = <attribute 'XmlDeclHandler' of 'pyexpat.xmlparser' objects>
buffer_size = <attribute 'buffer_size' of 'pyexpat.xmlparser' objects>
buffer_text = <attribute 'buffer_text' of 'pyexpat.xmlparser' objects>
buffer_used = <attribute 'buffer_used' of 'pyexpat.xmlparser' objects>
intern = <member 'intern' of 'pyexpat.xmlparser' objects>
namespace_prefixes = <attribute 'namespace_prefixes' of 'pyexpat.xmlparser' objects>
ordered_attributes = <attribute 'ordered_attributes' of 'pyexpat.xmlparser' objects>
specified_attributes = <attribute 'specified_attributes' of 'pyexpat.xmlparser' objects>

ExpatError

with_traceback(...)

  Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>

Functions

ErrorString

ErrorString(code, /)

  Returns string error for given number.

ParserCreate

ParserCreate(...)

  Return a new XML parser object.

Other members

EXPAT_VERSION = 'expat_2.4.4'
XML_PARAM_ENTITY_PARSING_ALWAYS = 2
XML_PARAM_ENTITY_PARSING_NEVER = 0
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE = 1
expat_CAPI = <capsule object "pyexpat.expat_CAPI" at 0x7f02260f5930>
features = [('sizeof(XML_Char)', 1), ('sizeof(XML_LChar)', 1), ('XML_DTD', 0), ('XML_CONTEXT_BYTES', 1024), ('XML_NS', 0), ('XML_BLAP_MAX_AMP', 100), ('XML_BLAP_ACT_THRES', 8388608)]
native_encoding = 'UTF-8'
version_info = (2, 4, 4)

Modules

errors

model

sys