Stay organized with collections
Save and categorize content based on your preferences.
DOMLocator
public
interface
DOMLocator
implements
SourceLocator
javax.xml.transform.dom.DOMLocator
|
Indicates the position of a node in a source DOM, intended
primarily for error reporting. To use a DOMLocator, the receiver of an
error must downcast the SourceLocator
object returned by an exception. A Transformer
may use this object for purposes other than error reporting, for instance,
to indicate the source node that originated a result node.
Summary
Public methods
getOriginatingNode
public abstract Node getOriginatingNode ()
Return the node where the event occurred.
Returns |
Node |
The node that is the location for the event. |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nDOMLocator\n==========\n\n\n`\npublic\n\n\ninterface\nDOMLocator\n`\n\n\n`\n\n\nimplements\n\n`[SourceLocator](/reference/javax/xml/transform/SourceLocator)`\n\n\n`\n\n|------------------------------------|\n| javax.xml.transform.dom.DOMLocator |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nIndicates the position of a node in a source DOM, intended\nprimarily for error reporting. To use a DOMLocator, the receiver of an\nerror must downcast the [SourceLocator](/reference/javax/xml/transform/SourceLocator)\nobject returned by an exception. A [Transformer](/reference/javax/xml/transform/Transformer)\nmay use this object for purposes other than error reporting, for instance,\nto indicate the source node that originated a result node.\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Node](/reference/org/w3c/dom/Node) | ` `[getOriginatingNode](/reference/javax/xml/transform/dom/DOMLocator#getOriginatingNode())`() ` Return the node where the event occurred. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[javax.xml.transform.SourceLocator](/reference/javax/xml/transform/SourceLocator)` ` |---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int` | ` `[getColumnNumber](/reference/javax/xml/transform/SourceLocator#getColumnNumber())`() ` Return the character position where the current document event ends. | | ` abstract int` | ` `[getLineNumber](/reference/javax/xml/transform/SourceLocator#getLineNumber())`() ` Return the line number where the current document event ends. | | ` abstract `[String](/reference/java/lang/String) | ` `[getPublicId](/reference/javax/xml/transform/SourceLocator#getPublicId())`() ` Return the public identifier for the current document event. | | ` abstract `[String](/reference/java/lang/String) | ` `[getSystemId](/reference/javax/xml/transform/SourceLocator#getSystemId())`() ` Return the system identifier for the current document event. | ||\n\nPublic methods\n--------------\n\n### getOriginatingNode\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract Node getOriginatingNode ()\n```\n\nReturn the node where the event occurred.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------|-----------------------------------------------------|\n| [Node](/reference/org/w3c/dom/Node) | The node that is the location for the event. \u003cbr /\u003e |"]]