org.simpleframework.xml.stream
Interface Position


public interface Position

The Position object is used to acquire the position of the read cursor within the XML file. This allows exceptions to be thrown with the line number so that the XML can be debugged.

Author:
Niall Gallagher

Method Summary
 int getLine()
          This is the actual line number within the read XML document.
 String toString()
          This provides a textual description of the position the read cursor is at within the XML document.
 

Method Detail

getLine

int getLine()
This is the actual line number within the read XML document. The line number allows any problems within the source XML document to be debugged if it does not match the schema. This will return -1 if the line number cannot be determined.

Returns:
this returns the line number of an XML event

toString

String toString()
This provides a textual description of the position the read cursor is at within the XML document. This allows the position to be embedded within the exception thrown.

Overrides:
toString in class Object
Returns:
this returns a textual description of the position