I have been using BaseX and REST for a few months now to play around with some XML files. Up to this point I have been exporting my files using the query:
db:export(',char(39),dbName,char(39),',',char(34),'path',char(34),')
If this is confusing, it is just because I am showing how it is constructed, the actual call looks like:
http://localhost:8984/rest?query=db%3Aexport%28%27dbName%27%2C%22C%3A%5CUsers%5Cdak52%5CDocuments%5Cfolder%22%29
Anyways, this works just fine, but I want to include the XML declaration in my output. I have tried setting the omit-xml-declaration
option to "no" but I guess I am not doing it correctly. It works fine when I try to export from the BaseX GUI specifying that option, but I want to do it all via REST, and that is where I am having problems. Below is my query with the option included.
http://localhost:8984/rest?query=db%3Aexport%28%27dbName%27%2C%22C%3A%5CUsers%5Cdak52%5CDocuments%5Cfolder%22%29&omit-xml-declaration=no
This runs and generates output, but this output does not include my xml declaration.