This example executes a simple XQuery expression ("1 to 100"), which returns the numbers from 1 to 100 inclusive.
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[]) {
Result result = query->execute(context);
while(item = result->
next(context)) {
std::cout << UTF8(item->
asString(context)) << std::endl;
}
return 0;
}
Definition XPath2MemoryManager.hpp:261
virtual const XMLCh * asString(const DynamicContext *context) const =0
virtual Item::Ptr next(DynamicContext *context)
Get the next item from the iterator. Returns null if the is no next value.
A scoped pointer wrapper for the lazily evaluated query result.
Definition Result.hpp:38
Provides factory methods for creating XQQuery and DynamicContext objects.
Definition XQilla.hpp:53
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.