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

PHP xml_get_current_byte_index() Function

PHP xml_get_current_byte_index() Function


PHP XML Reference Manual Complete PHP XML Reference Manual


Definition and Usage

The xml_get_current_byte_index() function gets the current byte index of an XML parser.

On success, this function returns the current byte index. On failure, it returns FALSE.

Syntax

xml_get_current_byte_index(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) . "
" . "Byte Index: " . xml_get_current_byte_index($xmlparser) . "
"); } } xml_parser_free($xmlparser); ?>

The output of the code above is shown below:

ERROR: Mismatched tag

Line: 5

Column: 41

Byte Index: 72


PHP XML Reference Manual Complete PHP XML Reference Manual