Class XPathSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jaxen.saxpath.SAXPathException
org.jaxen.saxpath.XPathSyntaxException
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXPathSyntaxException(String xpath, int position, String message) Creates a new XPathSyntaxException. -
Method Summary
Modifier and TypeMethodDescriptionReturns a long formatted description of the error, including line breaks.intReturns the index of the character at which the syntax error was detected in the XPath expression.private StringReturns a string in the form" ^"which, when placed on the line below the XPath expression in a monospaced font, should point to the location of the error.getXPath()Returns the syntactically incorrect XPath expression.toString()Methods inherited from class SAXPathException
getCause, initCause, printStackTrace, printStackTraceMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
xpath
-
position
private int position -
lineSeparator
-
-
Constructor Details
-
XPathSyntaxException
-
-
Method Details
-
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
Returns the syntactically incorrect XPath expression.
- Returns:
- the syntactically incorrect XPath expression
-
toString
-
getPositionMarker
Returns a string in the form
" ^"which, when placed on the line below the XPath expression in a monospaced font, should point to the location of the error.- Returns:
- the position marker
-
getMultilineMessage
Returns a long formatted description of the error, including line breaks.
- Returns:
- a longer description of the error on multiple lines
-