Package nux.xom.xquery

Examples of nux.xom.xquery.XQuery.execute()


      Nodes results = null;
      try { // here's where the query is actually executed
        XQuery xquery = new XQuery(squery, testSourcesDir.toURI());
//        XQuery xquery = new XQuery(squery, query.toURI());
//        XQuery xquery = XQueryPool.GLOBAL_POOL.getXQuery(squery, query.toURI());
        results = xquery.execute(null, null, vars).toNodes();
      } catch (Throwable t) {
        if (!inspect && expectedErrors.size() == 0) {
          System.out.println(XOMUtil.toPrettyXML(testCase));
          throw t;
        }
View Full Code Here


    } else {
      // otherwise it refers to a file containing the query string
      xquery = XQueryPool.GLOBAL_POOL.getXQuery(new File(query));
    }
   
    Nodes results = xquery.execute(doc).toNodes();
   
    for (int j=0; j < results.size(); j++) {
      boolean prettyPrint = true;
      if (prettyPrint)
        System.out.println(XOMUtil.toPrettyXML(results.get(j)));
View Full Code Here

    }
   
    private static Nodes query(String query, Node contextNode, Map<String, Object> variables) {
        try {
            XQuery xselect = XQueryPool.GLOBAL_POOL.getXQuery(query, null);
            Nodes nodes = xselect.execute(contextNode, null, variables).toNodes();
            return nodes;
        } catch (XQueryException ex) {
            throw new RuntimeException(ex);
        }
    }
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.