Easy Tutorial
❮ Php String Func Curl_File_Create ❯

PHP xml_set_processing_instruction_handler() Function



Definition and Usage

The xml_set_processing_instruction_handler() function specifies the function to be called when the parser encounters a processing instruction in the XML document.

Processing instructions are contained within <? and ?> delimiters and include a target with data.

Example: In this example, the processing instruction associates a stylesheet with an XML document:

The function returns TRUE on success and FALSE on failure.

Syntax

Parameter Description
parser Required. Specifies the XML parser to use.
handler Required. Specifies the function to be called when the parser finds a processing instruction.

The function specified by the "handler" parameter must have three parameters:

Parameter Description
parser Required. Specifies a variable containing the XML parser that calls the handler.
target Required. Specifies a variable containing the processing instruction target.
data Required. Specifies a variable containing the processing instruction data.

Tips and Notes

Note: The handler parameter can also be an array containing an object reference and method name.


Example


❮ Php String Func Curl_File_Create ❯