Interface Position

  • All Known Implementing Classes:
    InputPosition

    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.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getLine()
      This is the actual line number within the read XML document.
      java.lang.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

        java.lang.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 java.lang.Object
        Returns:
        this returns a textual description of the position