PHP xml_error_string() Function

The xml_error_string() function gets the XML parser error description.This function returns the error description on success, or FALSE on failure.

string xml_error_string ( int $code )

Gets the XML parser error string associated with the given code.

Example -

The output of the code above could be:

ERROR: Mismatched tag

Line: 5

Column: 41

ParameterDescription
codeAn error code from xml_get_error_code().

Returns a string with a textual description of the error code, or FALSE if no description was found.