Class XPathSyntaxException

  • All Implemented Interfaces:
    java.io.Serializable

    public class XPathSyntaxException
    extends SAXPathException
    Represents a syntax error in an XPath expression. This is a compile-time error that is detectable irrespective of the context in which the XPath expression is evaluated.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      XPathSyntaxException​(java.lang.String xpath, int position, java.lang.String message)
      Creates a new XPathSyntaxException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMultilineMessage()
      Returns a long formatted description of the error, including line breaks.
      int getPosition()
      Returns the index of the character at which the syntax error was detected in the XPath expression.
      java.lang.String getXPath()
      Returns the syntactically incorrect XPath expression.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XPathSyntaxException

        public XPathSyntaxException​(java.lang.String xpath,
                                    int position,
                                    java.lang.String message)
        Creates a new XPathSyntaxException.
        Parameters:
        xpath - the incorrect XPath expression
        position - the index of the character at which the syntax error was detected
        message - the detail message
    • Method Detail

      • getPosition

        public int getPosition()

        Returns the index of the character at which the syntax error was detected in the XPath expression.

        Returns:
        the character index in the XPath expression at which the syntax error was detected
      • getXPath

        public java.lang.String getXPath()

        Returns the syntactically incorrect XPath expression.

        Returns:
        the syntactically incorrect XPath expression
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable
      • getMultilineMessage

        public java.lang.String getMultilineMessage()

        Returns a long formatted description of the error, including line breaks.

        Returns:
        a longer description of the error on multiple lines