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

Reply via email to