This example executes a simple XQuery expression ("1 to 100"), which returns the numbers from 1 to 100 inclusive.
#include <iostream>
int main(int argc, char *argv[]) {
while(item = result->
next(context)) {
std::cout << UTF8(item->
asString(context)) << std::endl;
}
return 0;
}
Result execute(DynamicContext *context) const
Executes the query using the given DynamicContext, returning a lazy iterator over the results.
static XQQuery * parse(const XMLCh *query, DynamicContext *context=0, const XMLCh *queryFile=NULL, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
Parse the expression contained in the given query string.