Locator.getLineNumber

Return the line number where the current document event ends. Lines are delimited by line ends, which are defined in the XML specification.

<p><strong>Warning:</strong> The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. In some cases, these "line" numbers match what would be displayed as columns, and in others they may not match the source text due to internal entity expansion. </p>

<p>The return value is an approximation of the line number in the document entity or external parsed entity where the markup triggering the event appears.</p>

<p>If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first line is line 1.</p>

@return The line number, or -1 if none is available. @see #getColumnNumber

interface Locator(Ch = char)
int
getLineNumber
()

Meta