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 the sub-parser using ExternalEntityParserCreate(context)
, initializing it with the appropriate callbacks, and parsing the entity. This handler should return an integer; if it returns 0
, the parser will raise an XML_ERROR_EXTERNAL_ENTITY_HANDLING
error, otherwise parsing will continue.
If this handler is not provided, external entities are reported by the DefaultHandler
callback, if provided.
Please login to continue.