(PHP 4, PHP 5, PHP 7, PHP 8)
xml_set_element_handler — Set up start and end element handlers
Sets the element handler functions for the XML parser
.
start_handler
is called when a new XML element is opened. end_handler
is called when an XML element is closed.
parser
The XML parser.
start_handler
If null
or an empty string is passed, the handler is reset to its default state.
If handler
is a callable, the callable is set as the handler.
If handler
is a string, it can be the name of a method of an object set with xml_set_object().
The signature of the handler must be:
parser
name
attributes
attributes
is traversed is identical to the order in which the attributes were declared. end_handler
If null
or an empty string is passed, the handler is reset to its default state.
If handler
is a callable, the callable is set as the handler.
If handler
is a string, it can be the name of a method of an object set with xml_set_object().
The signature of the handler must be:
parser
name
Always returns true
.