The xml_set_external_entity_ref_handler() function specifies a function to be called when the parser finds an external entity in the XML document.This function returns TRUE on success, or FALSE on failure.
bool xml_set_external_entity_ref_handler ( resource $parser , callable $handler )
Sets the external entity reference handler function for the XML parser parser.
Parameter | Description |
---|---|
parser | A reference to the XML parser to set up external entity reference handler function. |
handler | Required. Specifies a function to be called when the parser finds an external entity |
Parameter | Description |
---|---|
parser | The first parameter, parser, is a reference to the XML parser calling the handler. |
name | Required. Specifies a variable containing the name of the external entity |
base | Required. Specifies the base for resolving the system identifier (system_id) of the external entity. Currently, this is always NULL |
system_id | The fourth parameter, system_id, is the system identifier as specified in the entity declaration. |
public_id | The fifth parameter, public_id, is the public identifier as specified in the entity declaration, or an empty string if none was specified; the whitespace in the public identifier will have been normalized as required by the XML spec. |
Returns TRUE on success or FALSE on failure.