Updating a Database Using XQJ
Using the CentraSite XQJ interface, you can update the registry/repository. This feature is a Software AG specific extension of XQJ.
To update an XQuery
1. Specify the string or the reader object containing the update XQuery
2. Invoke the executeUpdate() method on the expression.
String updateQuery =
"update for $q in input()/bib/book where $q/@year = 1994" +
"do replace $q/title with <title>XQJ from SoftwareAG </title>";
XQResultSequence xqResultSequence =
((XQExpressionImpl)expression).executeUpdate(updateQuery);
// execute update