I'm a tad more proficient with BaseX, but, how do I actually build an XQuery? Yes, I can write an XQuery and save it in a text file, then use BaseX for execution.
But it would be far more flexible to write the actual XQuery from within Java itself. But how?
Oracle gives an example:
OXQDataSource ds = new OXQDataSource(); XQConnection con = ds.getConnection(); String query = "<hello-world>{1 + 1}</hello-world>"; XQPreparedExpression expr = con.prepareExpression(query); XQSequence result = expr.executeQuery();
using their datasource. Cannot BaseX do something similar?
see also:
https://stackoverflow.com/q/53996575/262852
thanks,
Thufir
Oracle gives an example:
This example is based on the XQJ API. Have a look at [1] to see how it is used in BaseX (and what other APIs exist).
[1] http://docs.basex.org/wiki/Java_Examples
OXQDataSource ds = new OXQDataSource(); XQConnection con = ds.getConnection(); String query = "<hello-world>{1 + 1}</hello-world>"; XQPreparedExpression expr = con.prepareExpression(query); XQSequence result = expr.executeQuery();
using their datasource. Cannot BaseX do something similar?
see also:
https://stackoverflow.com/q/53996575/262852
thanks,
Thufir
basex-talk@mailman.uni-konstanz.de