Stay organized with collections
Save and categorize content based on your preferences.
DOMLocator
interface DOMLocator
DOMLocator
is an interface that describes a location (e.g. where an error occurred).
See also the Document Object Model (DOM) Level 3 Core Specification.
Summary
Public methods |
abstract Int |
The byte offset into the input source this locator is pointing to or -1 if there is no byte offset available.
|
abstract Int |
The column number this locator is pointing to, or -1 if there is no column number available.
|
abstract Int |
The line number this locator is pointing to, or -1 if there is no column number available.
|
abstract Node! |
The node this locator is pointing to, or null if no node is available.
|
abstract String! |
The URI this locator is pointing to, or null if no URI is available.
|
abstract Int |
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
getByteOffset
abstract fun getByteOffset(): Int
The byte offset into the input source this locator is pointing to or -1
if there is no byte offset available.
getColumnNumber
abstract fun getColumnNumber(): Int
The column number this locator is pointing to, or -1
if there is no column number available.
getLineNumber
abstract fun getLineNumber(): Int
The line number this locator is pointing to, or -1
if there is no column number available.
abstract fun getRelatedNode(): Node!
The node this locator is pointing to, or null
if no node is available.
getUri
abstract fun getUri(): String!
The URI this locator is pointing to, or null
if no URI is available.
getUtf16Offset
abstract fun getUtf16Offset(): Int
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-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 2025-02-10 UTC."],[],[],null,["# DOMLocator\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDOMLocator\n==========\n\n```\ninterface DOMLocator\n```\n\n|-----------------------------|\n| [org.w3c.dom.DOMLocator](#) |\n\n`DOMLocator` is an interface that describes a location (e.g. where 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\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getByteOffset](#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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getColumnNumber](#getColumnNumber())`()` The column number this locator is pointing to, or `-1` if there is no column number available. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getLineNumber](#getLineNumber())`()` The line number this locator is pointing to, or `-1` if there is no column number available. |\n| abstract [Node](https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom/-node/index.html)! | [getRelatedNode](#getRelatedNode())`()` The node this locator is pointing to, or `null` if no node is available. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getUri](#getUri())`()` The URI this locator is pointing to, or `null` if no URI is available. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getUtf16Offset](#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--------------\n\n### getByteOffset\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getByteOffset(): Int\n```\n\nThe byte offset into the input source this locator is pointing to or `-1` if there is no byte offset available. \n\n### getColumnNumber\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getColumnNumber(): Int\n```\n\nThe column number this locator is pointing to, or `-1` if there is no column number available. \n\n### getLineNumber\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getLineNumber(): Int\n```\n\nThe line number this locator is pointing to, or `-1` if there is no column number available. \n\n### getRelatedNode\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getRelatedNode(): Node!\n```\n\nThe node this locator is pointing to, or `null` if no node is available. \n\n### getUri\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getUri(): String!\n```\n\nThe URI this locator is pointing to, or `null` if no URI is available. \n\n### getUtf16Offset\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getUtf16Offset(): Int\n```\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 `-1` if there is no UTF-16 offset available."]]