GXPARSE hosted by SourceForge.net Logo

ca.gorman.xml.parse
Interface Location


public interface Location

Provides information about the parser's current location. The parser's current location is the point between the last document character to have been passed to the application as a character, an event, or a part of an object, and the next character that the parser is about to evaluate. The reported location is approximate because the information is not updated with every character that the parser reads. A Parser implementation should at least update the location at the beginning and end of each element.


Method Summary
 int getColumnNumber()
           Return the approximate column number at the parser's current location within the current document.
 String getEncoding()
           Returns the name of the character encoding for the entity.
 int getLineNumber()
           Return the approximate line number at the parser's current location within the current document.
 long getOffset()
           Return the approximate offset at the parser's current location.
 String getPublicId()
           Return the public identifier of the document that contains the parser's current location.
 String getSystemId()
           Return the system identifier of the document that contains the parser's current location.
 String getXMLVersion()
           Returns the version of XML used for the entity.
 String toString()
           String description of this Location.
 

Method Detail

getColumnNumber

int getColumnNumber()

Return the approximate column number at the parser's current location within the current document.

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

getLineNumber

int getLineNumber()

Return the approximate line number at the parser's current location within the current document.

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

getOffset

long getOffset()

Return the approximate offset at the parser's current location. The meaning of this offset, when it is available, is dependent on the Parser implementation.

Returns:
The offset, or -1 if none is available.

getPublicId

String getPublicId()

Return the public identifier of the document that contains the parser's current location.

Returns:
The public identifier, or null if none is available.

getSystemId

String getSystemId()

Return the system identifier of the document that contains the parser's current location.

Returns:
The system identifier, or null if none is available.

getXMLVersion

String getXMLVersion()

Returns the version of XML used for the entity.

Returns:
Identifier for the XML version being used to interpret the entity's text, or null if that information is not available.

getEncoding

String getEncoding()

Returns the name of the character encoding for the entity.

Returns:
Name of the character encoding being used to interpret the entity's text, or null if this is not available.

toString

String toString()

String description of this Location.

Overrides:
toString in class Object

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License