Stay organized with collections
Save and categorize content based on your preferences.
SourceLocator
interface SourceLocator
Known Direct Subclasses
DOMLocator |
Indicates the position of a node in a source DOM, intended primarily for error reporting.
|
|
This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
Summary
Public methods |
abstract Int |
Return the character position where the current document event ends.
|
abstract Int |
Return the line number where the current document event ends.
|
abstract String! |
Return the public identifier for the current document event.
|
abstract String! |
Return the system identifier for the current document event.
|
Public methods
getColumnNumber
abstract fun getColumnNumber(): Int
Return the character position where the current document event ends.
Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.
The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.
Return |
Int |
The column number, or -1 if none is available. |
getLineNumber
abstract fun getLineNumber(): Int
Return the line number where the current document event ends.
Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.
The return value is an approximation of the line number in the document entity or external parsed entity where the markup that triggered the event appears.
Return |
Int |
The line number, or -1 if none is available. |
getPublicId
abstract fun getPublicId(): String!
Return the public identifier for the current document event.
The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
Return |
String! |
A string containing the public identifier, or null if none is available. |
getSystemId
abstract fun getSystemId(): String!
Return the system identifier for the current document event.
The return value is the system identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
Return |
String! |
A string containing the system identifier, or null if none is 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,["# SourceLocator\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSourceLocator\n=============\n\n```\ninterface SourceLocator\n```\n\n|----------------------------------------|\n| [javax.xml.transform.SourceLocator](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [DOMLocator](/reference/kotlin/javax/xml/transform/dom/DOMLocator) |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | [DOMLocator](/reference/kotlin/javax/xml/transform/dom/DOMLocator) | Indicates the position of a node in a source DOM, intended primarily for error reporting. | |\n\nThis interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getColumnNumber](#getColumnNumber())`()` Return the character position where the current document event ends. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getLineNumber](#getLineNumber())`()` Return the line number where the current document event ends. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getPublicId](#getPublicId())`()` Return the public identifier for the current document event. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getSystemId](#getSystemId())`()` Return the system identifier for the current document event. |\n\nPublic methods\n--------------\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\nReturn the character position where the current document event ends.\n\n**Warning:** The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.\n\nThe return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The column number, or -1 if none is available. |\n\n**See Also**\n\n- [#getLineNumber](#getLineNumber()) \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\nReturn the line number where the current document event ends.\n\n**Warning:** The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.\n\nThe return value is an approximation of the line number in the document entity or external parsed entity where the markup that triggered the event appears.\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The line number, or -1 if none is available. |\n\n**See Also**\n\n- [#getColumnNumber](#getColumnNumber()) \n\n### getPublicId\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getPublicId(): String!\n```\n\nReturn the public identifier for the current document event.\n\nThe return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | A string containing the public identifier, or null if none is available. |\n\n**See Also**\n\n- [#getSystemId](#getSystemId()) \n\n### getSystemId\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getSystemId(): String!\n```\n\nReturn the system identifier for the current document event.\n\nThe return value is the system identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.\n\nIf the system identifier is a URL, the parser must resolve it fully before passing it to the application.\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | A string containing the system identifier, or null if none is available. |\n\n**See Also**\n\n- [#getPublicId](#getPublicId())"]]