Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP xml_get_error_code() Function

PHP xml_get_error_code() Function


PHP XML Reference Manual Complete PHP XML Reference Manual


Definition and Usage

The xml_get_error_code() function gets the XML parser error code.

On success, this function returns the error code. On failure, it returns FALSE.

Syntax

xml_get_error_code(parser)

Parameters Description
parser Required. Specifies the XML parser to use.

Example

" . "Line: " . xml_get_current_line_number($xmlparser) . "
" . "Column: " . xml_get_current_column_number($xmlparser) . "
"); } } xml_parser_free($xmlparser); ?>

The output of the code above is shown below:

ERROR: 76

Line: 5

Column: 41


PHP XML Reference Manual Complete PHP XML Reference Manual