The other question is how errors are communicated. 'execute' returns a boolean and writes data into a buffer. Will I have to parse the returned buffer for error messages?
An exception is thrown when an error occurs, like in this example:
// Run a buggy query try { session.execute("XQUERY ///"); } catch(final BaseXException ex) { System.out.println(ex.getMessage()); }
- Andreas
Godmar Back schrieb:
On Fri, Jul 23, 2010 at 8:31 PM, NewIntellectual newintellectual@gmail.com wrote:
session = new ClientSession("localhost", 1984, "admin", "admin");
session.execute(xquery, buffer);
result="<?xml version='1.0' encoding='UTF-8'?>"+buffer.toString("UTF-8");
ps: about your suggestion of using 'ClientSession.execute' to interact with the database.
I am thinking about this approach, but it becomes quickly clear that this will require us to reimplement an XQJ-like facility that allows us to formulate XQuery Updates in a maintainable way such that variables can be expressed (for variables now declared as 'external').
The other question is how errors are communicated. 'execute' returns a boolean and writes data into a buffer. Will I have to parse the returned buffer for error messages?
- Godmar
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk