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

PHP xml_get_current_line_number() Function

PHP xml_get_current_line_number() Function


PHP XML Reference Manual Complete PHP XML Reference Manual


Definition and Usage

The xml_get_current_line_number() function gets the current line number of an XML parser.

On success, this function returns the current line number. On failure, it returns FALSE.

Syntax

xml_get_current_line_number(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: Mismatched tag

Line: 5

Column: 41


PHP XML Reference Manual Complete PHP XML Reference Manual