Package org.apache.commons.jxpath

Examples of org.apache.commons.jxpath.JXPathInvalidSyntaxException


     * @param expr Expression to check
     */
    private void checkSimplePath(Expression expr) {
        if (!(expr instanceof LocationPath)
            || !((LocationPath) expr).isSimplePath()) {
            throw new JXPathInvalidSyntaxException(
                "JXPath can only create a path if it uses exclusively "
                    + "the child:: and attribute:: axes and has "
                    + "no context-dependent predicates");
        }
    }
View Full Code Here


            try {
                parser.ReInit(new StringReader(expression));
                expr = parser.parseExpression();
            }
            catch (TokenMgrError e) {
                throw new JXPathInvalidSyntaxException(
                    "Invalid XPath: '"
                        + addEscapes(expression)
                        + "'. Invalid symbol '"
                        + addEscapes(String.valueOf(e.getCharacter()))
                        + "' "
                        + describePosition(expression, e.getPosition()));
            }
            catch (ParseException e) {
                throw new JXPathInvalidSyntaxException(
                    "Invalid XPath: '"
                        + addEscapes(expression)
                        + "'. Syntax error "
                        + describePosition(
                            expression,
View Full Code Here

     * @param max int
     */
    private void assertArgRange(int min, int max) {
        int ct = getArgumentCount();
        if (ct < min || ct > max) {
            throw new JXPathInvalidSyntaxException(
                    "Incorrect number of arguments: " + this);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jxpath.JXPathInvalidSyntaxException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.