This example executes a simple XQuery expression ("1 to 100"), which returns the numbers from 1 to 100 inclusive.
int main(int argc, char *argv[])
{
const char *value;
if(impl == 0) return 1;
err = impl->
prepare(impl,
"1 to 100", 0, &expr);
if(err != 0) goto free_impl;
err = expr->
execute(expr, 0, &seq);
if(err != 0) goto free_expr;
printf("%s\n", value);
}
free_expr:
free_impl:
return err;
}