{
    "mode": "pydoc",
    "parameter": "pyexpat",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/pyexpat/json",
    "generated": "2026-06-02T13:23:46Z",
    "sections": {
        "NAME": {
            "content": "pyexpat - Python wrapper for Expat parser.\n",
            "subsections": []
        },
        "SUBMODULES": {
            "content": "errors\nmodel\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nxml.parsers.expat.ExpatError\nbuiltins.object\nxmlparser\n",
            "subsections": [
                {
                    "name": "class ExpatError",
                    "content": "|  Method resolution order:\n|      ExpatError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\nXMLParserType = class xmlparser(builtins.object)\n|  XML parser\n|\n|  Methods defined here:\n|\n|  ExternalEntityParserCreate(...)\n|      Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.\n|\n|  GetBase(self, /)\n|      Return base URL string for the parser.\n|\n|  GetInputContext(self, /)\n|      Return the untranslated text of the input that caused the current event.\n|\n|      If the event was generated by a large amount of text (such as a start tag\n|      for an element with many attributes), not all of the text may be available.\n|\n|  Parse(self, data, isfinal=False, /)\n|      Parse XML data.\n|\n|      `isfinal' should be true at end of input.\n|\n|  ParseFile(self, file, /)\n|      Parse XML data from file-like object.\n|\n|  SetBase(self, base, /)\n|      Set the base URL for the parser.\n|\n|  SetParamEntityParsing(self, flag, /)\n|      Controls parsing of parameter entities (including the external DTD subset).\n|\n|      Possible flag values are XMLPARAMENTITYPARSINGNEVER,\n|      XMLPARAMENTITYPARSINGUNLESSSTANDALONE and\n|      XMLPARAMENTITYPARSINGALWAYS. Returns true if setting the flag\n|      was successful.\n|\n|  UseForeignDTD(self, flag=True, /)\n|      Allows the application to provide an artificial external subset if one is not specified as part of the document instance.\n|\n|      This readily allows the use of a 'default' document type controlled by the\n|      application, while still getting the advantage of providing document type\n|      information to the parser. 'flag' defaults to True if not provided.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  AttlistDeclHandler\n|\n|  CharacterDataHandler\n|\n|  CommentHandler\n|\n|  CurrentByteIndex\n|\n|  CurrentColumnNumber\n|\n|  CurrentLineNumber\n|\n|  DefaultHandler\n|\n|  DefaultHandlerExpand\n|\n|  ElementDeclHandler\n|\n|  EndCdataSectionHandler\n|\n|  EndDoctypeDeclHandler\n|\n|  EndElementHandler\n|\n|  EndNamespaceDeclHandler\n|\n|  EntityDeclHandler\n|\n|  ErrorByteIndex\n|\n|  ErrorCode\n|\n|  ErrorColumnNumber\n|\n|  ErrorLineNumber\n|\n|  ExternalEntityRefHandler\n|\n|  NotStandaloneHandler\n|\n|  NotationDeclHandler\n|\n|  ProcessingInstructionHandler\n|\n|  SkippedEntityHandler\n|\n|  StartCdataSectionHandler\n|\n|  StartDoctypeDeclHandler\n|\n|  StartElementHandler\n|\n|  StartNamespaceDeclHandler\n|\n|  UnparsedEntityDeclHandler\n|\n|  XmlDeclHandler\n|\n|  buffersize\n|\n|  buffertext\n|\n|  bufferused\n|\n|  intern\n|\n|  namespaceprefixes\n|\n|  orderedattributes\n|\n|  specifiedattributes\n\nerror = class ExpatError(builtins.Exception)\n|  Method resolution order:\n|      ExpatError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "ErrorString(code, /)\nReturns string error for given number.\n\nParserCreate(...)\nReturn a new XML parser object.\n",
            "subsections": []
        },
        "DATA": {
            "content": "EXPATVERSION = 'expat2.4.7'\nXMLPARAMENTITYPARSINGALWAYS = 2\nXMLPARAMENTITYPARSINGNEVER = 0\nXMLPARAMENTITYPARSINGUNLESSSTANDALONE = 1\nexpatCAPI = <capsule object \"pyexpat.expatCAPI\">\nfeatures = [('sizeof(XMLChar)', 1), ('sizeof(XMLLChar)', 1), ('XMLD...\nnativeencoding = 'UTF-8'\nversioninfo = (2, 4, 7)\n",
            "subsections": []
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "pyexpat - Python wrapper for Expat parser.",
    "flags": [],
    "examples": [],
    "see_also": []
}