Added in API level 8

DOMLocator

interface DOMLocator : SourceLocator

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 javax.xml.transform.SourceLocator object returned by an exception. A javax.xml.transform.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
abstract Node!

Return the node where the event occurred.

Inherited functions
Int getColumnNumber()

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.

Int getLineNumber()

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.

String! getPublicId()

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.

String! getSystemId()

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.

Public methods

getOriginatingNode

Added in API level 8
abstract fun getOriginatingNode(): Node!

Return the node where the event occurred.

Return
Node! The node that is the location for the event.