Examples of XQuery


Examples of org.zorbaxquery.api.XQuery

  private void callZorbaCalls(String filename, String value) throws Exception {
    InMemoryStore store = InMemoryStore.getInstance();
    Zorba zorba = Zorba.getInstance(store);
    String query = "declare variable $test external;" + "$test//b";
    XQuery xquery = zorba.compileQuery(query);
    xquery.setVariableAsDocument("test", filename, value);
    Iterator iter = xquery.iterator();
    iter.open();
    Item item = new Item();
    while (iter.next(item)) {
      String itemStr = item.serialize();
      System.out.println(itemStr);
    }
    // clean up
    iter.close();
    iter.destroy();
    xquery.destroy();
    zorba.shutdown();
    InMemoryStore.shutdown(store);
  }
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.