Examples of xpath()


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

              // parse the query into the internal syntax tree
        XQueryContext context = new XQueryContext(broker.getBrokerPool(), AccessContext.TEST);
        XQueryLexer lexer = new XQueryLexer(context, new StringReader(query));
        XQueryParser xparser = new XQueryParser(lexer);
        XQueryTreeParser treeParser = new XQueryTreeParser(context);
        xparser.xpath();
        if (xparser.foundErrors()) {
          System.err.println(xparser.getErrorMessage());
          return;
        }
 
View Full Code Here

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

            }
           
            final AST ast = parser.getAST();
           
            final PathExpr expr = new PathExpr(context);
            treeParser.xpath(ast, expr);
            if (treeParser.foundErrors()) {
                LOG.debug(treeParser.getErrorMessage());
                throw new EXistException(treeParser.getErrorMessage());
            }
            LOG.info("query: " + ExpressionDumper.dump(expr));
View Full Code Here

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

            PathExpr expr = new PathExpr(context);
            if (xpointer)
                treeParser.xpointer(ast, expr);
            else
                treeParser.xpath(ast, expr);
            if (treeParser.foundErrors()) {
                throw new StaticXQueryException(
                treeParser.getErrorMessage(),
                treeParser.getLastException());
            }
View Full Code Here

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

     
      if (LOG.isDebugEnabled())
        {LOG.debug("generated AST: " + ast.toStringTree());}

      final PathExpr expr = new PathExpr(context);
      treeParser.xpath(ast, expr);
      if (treeParser.foundErrors()) {
        throw new SAXException(treeParser.getErrorMessage());
      }
      expr.analyze(new AnalyzeContextInfo());
      final Sequence seq = expr.eval(null, null);
View Full Code Here

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

                LOG.debug(parser.getErrorMessage());
            }
            final AST ast = parser.getAST();
            LOG.debug("generated AST: " + ast.toStringTree());
            expr = new PathExpr(context);
            treeParser.xpath(ast, expr);
            if (treeParser.foundErrors()) {
                LOG.debug(treeParser.getErrorMessage());
            }
            expr.analyze(new AnalyzeContextInfo());
            for (final SequenceIterator i = other.iterate(); i.hasNext();) {
View Full Code Here

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

//            LOG.debug("Generated AST: " + ast.toStringTree());
            final PathExpr expr = new PathExpr(context);
            if(xpointer) {
                treeParser.xpointer(ast, expr);
            } else {
                treeParser.xpath(ast, expr);
            }
           
            if(treeParser.foundErrors()) {
                //AST treeAst = treeParser.getAST();
                throw new StaticXQueryException(ast.getLine(), ast.getColumn(), treeParser.getErrorMessage(), treeParser.getLastException());
View Full Code Here

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

          parser.getErrorMessage());
      }
      final AST ast = parser.getAST();
     
      final PathExpr path = new PathExpr(pContext);
      astParser.xpath(ast, path);
      if(astParser.foundErrors()) {
        throw astParser.getLastException();
      }
      path.analyze(new AnalyzeContextInfo());
    } catch (final RecognitionException e) {     
View Full Code Here

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

 
        AST ast = xparser.getAST();
        System.out.println("generated AST: " + ast.toStringTree());
 
        PathExpr expr = new PathExpr(context);
        treeParser.xpath(ast, expr);
        if (treeParser.foundErrors()) {
          System.err.println(treeParser.getErrorMessage());
          return;
        }
        expr.analyze(new AnalyzeContextInfo());
View Full Code Here

Examples of org.opennebula.client.user.User.xpath()

            System.out.println(rc.getErrorMessage());
            return;
        }

        // This is how the info returned looks like...
        System.out.println("Info for " + javaUser.xpath("name") + "...");
        System.out.println(rc.getMessage());

        // Wait a second... what was that xpath method for?
        // Now that we have the user's info loaded, we can use xpath expressions
        // without parsing and initializing any xml, as simple as
View Full Code Here

Examples of org.opennebula.client.vm.VirtualMachine.xpath()

            System.out.println("The new VM " +
                    vm.getName() + " has status: " + vm.status());

            // And we can also use xpath expressions
            System.out.println("The path of the disk is");
            System.out.println( "\t" + vm.xpath("template/disk/source") );

            // Let's delete the VirtualMachine object.
            vm = null;

            // The reference is lost, but we can ask OpenNebula about the VM
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.