I am trying to run the following query in BaseX,
let $c := doc('t.xq')//entry return (replace value of node $c/author with 'BaseX' )
The input file t.xq
is
<entry>
<title>Transform expression example</title>
<author>BaseX Team</author>
</entry>
I expect it to return the modified data, but it executes and return nothing.
it says Updates are not written back
How can I see the modified entry
? which commands return the altered data?
Cited from http://docs.basex.org/wiki/XQuery_Update:
However, if you only need to get the output of an update command you can copy it to a variable (in memory) and transform this variable as follows:
You can also use
update
which is a convenience operator for writing simple transform expressions.