public interface Located
While it would seem intuitive that this represents the location where the content starts, in fact, if the data is populated by a SAX parser the line and column values represent the end of the SAX event.
SAX parsers may vary, but it typically means the character after the last character for Text and CDATA values, the character after EntityRef, Comment, and ProcessingInstruction data, and the character after the opening tag for Element content. For DocType content, it appears that Xerces is inconsistent in the location, with the location being set at what appears to be the start of the internal subset data (if any).
Finally, remember that the column value counts characters, and thus, if you have tab-indented values, the tab counts as a single character (regardless of how much it indents).
Modifier and Type | Method and Description |
---|---|
int |
getColumn()
Get the column (character on the line).
|
int |
getLine()
Get the line number
|
void |
setColumn(int col)
Set the column (character on the line).
|
void |
setLine(int line)
Set the line number
|
int getLine()
int getColumn()
void setLine(int line)
line
- the line.void setColumn(int col)
col
- The columnCopyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.