Examples of xpath()


Examples of org.apache.camel.builder.xml.Namespaces.xpath()

        context.getRouteDefinition("decrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
                @Override
                public void configure() throws Exception {
                    interceptSendToEndpoint("mock:out")
                        .when(namespaces.xpath(cityExistsXPath))
                            .to("mock:correctlyDecrypted");
                }
            });
        context.start();
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces.xpath()

    public void configure() throws Exception {
        Namespaces namespaces = new Namespaces("c", "http://camelcookbook.org/schema/books")
            .add("se", "http://camelcookbook.org/schema/somethingElse");

        from("direct:in")
            .split(namespaces.xpath("/c:books/c:book[@category='Tech']/c:authors/c:author/text()"))
                .to("mock:out")
            .end();
    }
}
View Full Code Here

Examples of org.apache.servicemix.bean.XPath.xpath()

            Content content = (Content) annotation;
            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        } else if (annotation instanceof XPath) {
            XPath xpathAnnotation = (XPath) annotation;
            return new JAXPStringXPathExpression(xpathAnnotation.xpath());
        }
        return null;
    }

    protected Expression createContentExpression(final PojoMarshaler marshaller) {
View Full Code Here

Examples of org.apache.servicemix.bean.XPath.xpath()

            Content content = (Content) annotation;
            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        } else if (annotation instanceof XPath) {
            XPath xpathAnnotation = (XPath) annotation;
            JAXPStringXPathExpression expr = new JAXPStringXPathExpression(xpathAnnotation.xpath());
            if (!xpathAnnotation.prefix().equals("") && !xpathAnnotation.uri().equals("")) {
                DefaultNamespaceContext ctx = new DefaultNamespaceContext();
                ctx.add(xpathAnnotation.prefix(), xpathAnnotation.uri());
                expr.setNamespaceContext(ctx);
            }
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

            // TODO(pkaminsk2): why replicate XQuery.compile here?
           
            final XQueryLexer lexer = new XQueryLexer(context, new StringReader(xpath));
            final XQueryParser parser = new XQueryParser(lexer);
            final XQueryTreeParser treeParser = new XQueryTreeParser(context);
            parser.xpath();
            if (parser.foundErrors()) {
                LOG.debug(parser.getErrorMessage());
                throw new RemoteException(parser.getErrorMessage());
            }
           
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

    XQueryTreeParser treeParser = new XQueryTreeParser(context);
    try {
            if (xpointer)
                parser.xpointer();
            else
                parser.xpath();
            if (parser.foundErrors()) {
              LOG.debug(parser.getErrorMessage());
              throw new StaticXQueryException(
                parser.getErrorMessage());
            }
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

      }
      // TODO(pkaminsk2): why replicate XQuery.compile here?
      final XQueryLexer lexer = new XQueryLexer(context, new StringReader(select));
      final XQueryParser parser = new XQueryParser(lexer);
      final XQueryTreeParser treeParser = new XQueryTreeParser(context);
      parser.xpath();
      if (parser.foundErrors()) {
        throw new SAXException(parser.getErrorMessage());
      }

      final AST ast = parser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

            broker = pool.get(user);
            final XQueryContext context = new XQueryContext(pool, accessCtx);
            final XQueryLexer lexer = new XQueryLexer(context, new StringReader(sortExpr));
            final XQueryParser parser = new XQueryParser(lexer);
            final XQueryTreeParser treeParser = new XQueryTreeParser(context);
            parser.xpath();
            if (parser.foundErrors()) {
                //TODO : error ?
                LOG.debug(parser.getErrorMessage());
            }
            final AST ast = parser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

        final XQueryTreeParser treeParser = new XQueryTreeParser(context);
        try {
            if(xpointer) {
                parser.xpointer();
            } else {
                parser.xpath();
            }
           
            if(parser.foundErrors()) {
              LOG.debug(parser.getErrorMessage());
              throw new StaticXQueryException(parser.getErrorMessage());
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.xpath()

    final XQueryLexer lexer = new XQueryLexer(pContext, new StringReader(expr));
    final XQueryParser parser = new XQueryParser(lexer);
    // shares the context of the outer expression
    final XQueryTreeParser astParser = new XQueryTreeParser(pContext);
    try {
        parser.xpath();
      if(parser.foundErrors()) {
        logger.debug(parser.getErrorMessage());
        throw new XPathException(this, "error found while executing expression: " +
          parser.getErrorMessage());
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.