Hi,
While improving my C++ test application for the libBasexCpp library, I tried to execute this line:
update insert <Line_1 line="1">Content 1</Line_1> into doc('/TestCppClient/Test.xml')/root
This resulted in a crash. And since I only know the basics from XQuery, I wanted to use the GUI for debugging this instruction.
Even in the GUI this line could not be executed.
I consulted Mistral/leChat and it came to the conclusion that probably I haven't enabled the XQuery Update facility. But in the GUI I don't see how I could enable the update facility.
Reading https://docs.basex.org/main/Updates#original_files might help:
In BaseX, all updates are performed on database nodes or in main memory. By default, update operations do not affect the original input file (the info string “Updates are not written back” is output to indicate this). The following solutions exist to write XML documents and binary resources to disk:
fn:doc or fn:collection will
be propagated back to disk if WRITEBACK is
turned on. This option can also be activated on command
line via -u.
Make sure you back up the original documents before running your
queries.fn:put or file:write can
be used to write single XML documents to disk. With file:write-binary,
you can write binary resources.