LOCATOR-LINE-NUMBER attribute

The current line in the XML source.

Data type: INTEGER

Access: Read-only

Applies to: SAX-reader object handle

Valid only in a callback. Use the SELF handle to get it, as in the following fragment:

myLineNum = SELF:LOCATOR-LINE-NUMBER.

Gives the line number where the text that caused the current callback ends. The first line in a document is 1. If the current location is an external entity—that is, external to the main XML source—the line number is relative to the beginning of the external entity.