PHP xml_get_current_byte_index() Function
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
Complete PHP XML Reference Manual