My favorites | Sign in
Logo
                
Search
for
Updated Jul 22, 2008 by yuin405
Labels: Phase-Implementation, Featured
ProgrammingAPI  
Programming with the XBird API -- XQuery processor API

This document introduces directions for embedded uses.

Compiling and executing queries

Running a XML query is fairly easy.

InputStream input = ..  ; // a query as stream
XQueryProcessor proc = new XQueryProcessor();
// #1 compile a query
XQueryModule module = proc.parse(input);
// #2 execute the compiled expression using ``pull'' mode
Sequence<? extends Item> result = proc.execute(module);
for(Item item : result) {// Note that every Sequence instances implement Iterable. 
    /* do something with item. */
    ..
}

List of examples

  • Example1.java - introduces pull/push mode with simple examples
  • XQTSTestBase - contains full-fledged (and also complex) usage of XBird API

Sign in to add a comment
Hosted by Google Code