Interface XMLLocator

All Superinterfaces:
Locator, Locator2
All Known Implementing Classes:
HTMLScanner, XMLLocatorImpl

public interface XMLLocator extends Locator2
Interface for tracking location information during document parsing.

Extends SAX Locator2 to provide additional system identifiers and character offsets for precise error reporting and source tracking.

Author:
Andy Clark, IBM
  • Method Details

    • getLiteralSystemId

      String getLiteralSystemId()
      Returns the literal system identifier.
      Returns:
      the literal system identifier, or null if none is available
    • getBaseSystemId

      String getBaseSystemId()
      Returns the base system identifier.
      Returns:
      the base system identifier, or null if none is available
    • getCharacterOffset

      int getCharacterOffset()
      Returns the character offset within the input stream or character stream.
      Returns:
      the character offset, or -1 if no character offset is available