Dear Csaba,
sorry for the late feedback.
- Is it possible to replace the whole content of a document stored in the
database with newer content that's in raw XML format? Right now I'm deleting the document which is straightforward, and then adding it back again with the new content which is not really atomic. I have tried with XQUF but it won't accept raw XML.
Currently no. It's true that XQUF doesn't allow you to add documents to databases. Instead, we plan to add BaseX-specific XQuery functions to add, delete, rename and replace documents in the database. As an alternative, we might add a REPLACE database command; I've added a GitHub issue to remember your feature request.
- Is it possible to retrieve the content of a document without using
XQuery? I'm thinking of something similar to the Delete command where the path to the document is needed. Is there a command that by specifying the path to a document returns the XML content stored under that path?
Nope; I'm sorry you'll need XQuery to access the document contents. You might append the document path to the OPEN command, however, to open only a subset of the addressed database. The following example opens and prints the documents in the "path" directory:
open collection/path; xquery /
Hope this helps, Christian ___________________________
Christian Grün BaseX Team Uni KN, Box 188 78457 Konstanz, Germany http://www.inf.uni-konstanz.de/~gruen