Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.xml.esax
Class XMLLocator

java.lang.Object
  extended by oracle.javatools.xml.esax.XMLLocator

public abstract class XMLLocator
extends java.lang.Object

Object representing the location of an XML file being processed by the Extensible SAX parser.


Constructor Summary
XMLLocator(java.net.URI xmlURI)
          Create an XML locator.
 
Method Summary
abstract  org.xml.sax.InputSource createInputSource()
          Create a SAX input source for this locator.
 int getColumnNumber()
          Return the column number where the current document event ends.
 int getLineNumber()
          Return the line number where the current document event ends.
 java.lang.String getName()
          Get a human readable name for this locator.
 java.net.URI getURI()
          Get the URI of the XML being processed.
 void setColumnNumber(int column)
           
 void setLineNumber(int line)
           
 java.lang.String toString()
          Get a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLLocator

public XMLLocator(java.net.URI xmlURI)
Create an XML locator.

Parameters:
xmlURI - a URI representing the location of the XML file.
Method Detail

getURI

public final java.net.URI getURI()
Get the URI of the XML being processed.

Returns:
the URI

createInputSource

public abstract org.xml.sax.InputSource createInputSource()
                                                   throws java.io.IOException
Create a SAX input source for this locator. The default implementation

Returns:
a SAX input source.
Throws:
java.io.IOException

getName

public java.lang.String getName()
Get a human readable name for this locator.

Returns:
a human readable name for this locator.

toString

public java.lang.String toString()
Get a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this object.

getLineNumber

public 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 triggering the event appears.

If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first line in the document is line 1.

Returns:
The line number, or -1 if none is available.
See Also:
getColumnNumber()

getColumnNumber

public int getColumnNumber()
Return the column 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 column number in the document entity or external parsed entity where the markup triggering the event appears.

If possible, the SAX driver should provide the line position of the first character after the text associated with the document event.

If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first column in each line is column 1.

Returns:
The column number, or -1 if none is available.
See Also:
getLineNumber()

setLineNumber

public void setLineNumber(int line)

setColumnNumber

public void setColumnNumber(int column)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.