Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01

org.w3c.dom
Interface DOMLocator


public interface DOMLocator

DOMLocator is an interface that describes a location (e.g. where an error occured).

See also the Document Object Model (DOM) Level 3 Core Specification.

Since:
DOM Level 3

Method Summary
 int getColumnNumber()
          The column number this locator is pointing to, or -1 if there is no column number available.
 int getLineNumber()
          The line number this locator is pointing to, or -1 if there is no column number available.
 int getOffset()
          The byte or character offset into the input source this locator is pointing to.
 Node getRelatedNode()
          The node this locator is pointing to, or null if no node is available.
 java.lang.String getUri()
          The URI this locator is pointing to, or null if no URI is available.

 

Method Detail

getLineNumber

public int getLineNumber()
The line number this locator is pointing to, or -1 if there is no column number available.

getColumnNumber

public int getColumnNumber()
The column number this locator is pointing to, or -1 if there is no column number available.

getOffset

public int getOffset()
The byte or character offset into the input source this locator is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. The value is -1 if there is no offset available.

getRelatedNode

public Node getRelatedNode()
The node this locator is pointing to, or null if no node is available.

getUri

public java.lang.String getUri()
The URI this locator is pointing to, or null if no URI is available.

Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01