DOMLocator
Stay organized with collections
Save and categorize content based on your preferences.
Public Method Summary
abstract
int
|
getByteOffset()
The byte offset into the input source this locator is pointing to or
-1 if there is no byte offset available.
|
abstract
int
|
getColumnNumber()
The column number this locator is pointing to, or -1 if
there is no column number available.
|
abstract
int
|
getLineNumber()
The line number this locator is pointing to, or -1 if
there is no column number available.
|
abstract
Node
|
getRelatedNode()
The node this locator is pointing to, or null if no node
is available.
|
abstract
String
|
getUri()
The URI this locator is pointing to, or null if no URI is
available.
|
abstract
int
|
getUtf16Offset()
The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or
-1 if there is no UTF-16 offset available.
|
Public Methods
public
abstract
int
getByteOffset
()
The byte offset into the input source this locator is pointing to or
-1
if there is no byte offset available.
public
abstract
int
getColumnNumber
()
The column number this locator is pointing to, or -1
if
there is no column number available.
public
abstract
int
getLineNumber
()
The line number this locator is pointing to, or -1
if
there is no column number available.
The node this locator is pointing to, or null
if no node
is available.
public
abstract
String
getUri
()
The URI this locator is pointing to, or null
if no URI is
available.
public
abstract
int
getUtf16Offset
()
The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or
-1
if there is no UTF-16 offset available.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eDOMLocator\u003c/code\u003e interface describes a location, often where an error occurred, within a document.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to retrieve location information such as byte offset, column number, line number, related node, URI, and UTF-16 offset.\u003c/p\u003e\n"],["\u003cp\u003eThese methods may return \u003ccode\u003e-1\u003c/code\u003e or \u003ccode\u003enull\u003c/code\u003e if the requested information is unavailable.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the Document Object Model (DOM) Level 3 Core Specification for further details.\u003c/p\u003e\n"]]],[],null,["public interface **DOMLocator** \n`DOMLocator` is an interface that describes a location (e.g.\nwhere an error occurred).\n\nSee also the [Document Object Model (DOM) Level 3 Core Specification](http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407). \n\nPublic Method Summary\n\n|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [getByteOffset](../../../../reference/org/w3c/dom/DOMLocator.html#getByteOffset())() The byte offset into the input source this locator is pointing to or `-1` if there is no byte offset available. |\n| abstract int | [getColumnNumber](../../../../reference/org/w3c/dom/DOMLocator.html#getColumnNumber())() The column number this locator is pointing to, or `-1` if there is no column number available. |\n| abstract int | [getLineNumber](../../../../reference/org/w3c/dom/DOMLocator.html#getLineNumber())() The line number this locator is pointing to, or `-1` if there is no column number available. |\n| abstract [Node](../../../../reference/org/w3c/dom/Node.html) | [getRelatedNode](../../../../reference/org/w3c/dom/DOMLocator.html#getRelatedNode())() The node this locator is pointing to, or `null` if no node is available. |\n| abstract [String](../../../../reference/java/lang/String.html) | [getUri](../../../../reference/org/w3c/dom/DOMLocator.html#getUri())() The URI this locator is pointing to, or `null` if no URI is available. |\n| abstract int | [getUtf16Offset](../../../../reference/org/w3c/dom/DOMLocator.html#getUtf16Offset())() The UTF-16, as defined in \\[Unicode\\] and Amendment 1 of \\[ISO/IEC 10646\\], offset into the input source this locator is pointing to or `-1` if there is no UTF-16 offset available. |\n\nPublic Methods \n\npublic abstract int\n**getByteOffset**\n() \nThe byte offset into the input source this locator is pointing to or\n`-1` if there is no byte offset available. \n\npublic abstract int\n**getColumnNumber**\n() \nThe column number this locator is pointing to, or `-1` if\nthere is no column number available. \n\npublic abstract int\n**getLineNumber**\n() \nThe line number this locator is pointing to, or `-1` if\nthere is no column number available. \n\npublic abstract [Node](../../../../reference/org/w3c/dom/Node.html)\n**getRelatedNode**\n() \nThe node this locator is pointing to, or `null` if no node\nis available. \n\npublic abstract [String](../../../../reference/java/lang/String.html)\n**getUri**\n() \nThe URI this locator is pointing to, or `null` if no URI is\navailable. \n\npublic abstract int\n**getUtf16Offset**\n() \nThe UTF-16, as defined in \\[Unicode\\] and Amendment 1 of \\[ISO/IEC 10646\\], offset into the input source this locator is pointing to or\n`-1` if there is no UTF-16 offset available."]]