PHP xml_set_object() Function

The xml_set_object() function allows a parser to be used within an object.This function returns TRUE on success, or FALSE on failure.

bool xml_set_object ( resource $parser , object &$object )

Example -

The above example will output : -

string(1) "A"
array(1) {
  ["ID"]=>
  string(5) "hallo"
}
string(3) "PHP"
string(1) "A"

ParameterDescription
parserA reference to the XML parser to use inside the object.
objectThe object where to use the XML parser.

Returns TRUE on success or FALSE on failure.