Guten Tag, die Herren! I have a question about how I can insert, replace a node with a DOM node, instead of the text of that node. Right now when I 1) execute from the basex shell this command: xquery replace value of node /text//sent[@id=15] with <sent id=15><clause><word/><word/><word/></clause></sent>
2) and then look at that node again with xquery /text//sent[@id=15]i see that the dom has been converted into a text node of <sent id=15><clause><word/><word/><word/></clause></sent> How can I replace with true DOM and not have it convert to text?
Just use "replace node" instead of "replace value of node". Feel free to check out our documentation, it contains more information.
Am 14.03.2017 18:42 schrieb "mark bordelon" markcbordelon@yahoo.com:
Guten Tag, die Herren!
I have a question about how I can insert, replace a node with a DOM node, instead of the text of that node.
Right now when I
- execute from the basex shell this command:
*xquery replace value of node /text//sent[@id=15] with* *<sent id=15><clause><word/><word/><word/></clause></sent>*
- and then look at that node again with
*xquery /text//sent[@id=15]* i see that the dom has been converted into a text node of *<sent id=15><clause><word/><word/><word/></clause></sent>*
How can I replace with true DOM and not have it convert to text?
Thank you, Christian.I expected it to be that easy.
From: Christian Grün christian.gruen@gmail.com To: mark bordelon markcbordelon@yahoo.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Sent: Tuesday, March 14, 2017 1:45 PM Subject: Re: [basex-talk] XQUERY UPDATE question
Just use "replace node" instead of "replace value of node". Feel free to check out our documentation, it contains more information.
Am 14.03.2017 18:42 schrieb "mark bordelon" markcbordelon@yahoo.com:
Guten Tag, die Herren! I have a question about how I can insert, replace a node with a DOM node, instead of the text of that node. Right now when I 1) execute from the basex shell this command: xquery replace value of node /text//sent[@id=15] with <sent id=15><clause><word/><word/>< word/></clause></sent>
2) and then look at that node again with xquery /text//sent[@id=15]i see that the dom has been converted into a text node of <sent id=15><clause>< word/><word/>< word/></clause></ sent> How can I replace with true DOM and not have it convert to text?
Another question about a procedure.I would like to back up my Basex database to S3, but as the xml files.I know that I can individually get texts with xquery db:open but was looking for a one-command version from the command line to export all files in their databases to the filesystem. Can someone point me to docs or give an example? Thanks
Did you already check out the Commands article in our documentation?
Am 16.03.2017 18:50 schrieb "mark bordelon" markcbordelon@yahoo.com:
Another question about a procedure. I would like to back up my Basex database to S3, but as the xml files. I know that I can individually get texts with xquery db:open but was looking for a one-command version from the command line to export all files in their databases to the filesystem.
Can someone point me to docs or give an example?
Thanks
Hi Mark,
On Thu, Mar 16, 2017 at 1:50 PM, mark bordelon markcbordelon@yahoo.com wrote:
Another question about a procedure. I would like to back up my Basex database to S3, but as the xml files. I know that I can individually get texts with xquery db:open but was looking for a one-command version from the command line to export all files in their databases to the filesystem.
Can someone point me to docs or give an example?
See the EXPORT command [1]. It can be used in several ways [2].
Thanks
Hope that helps! Best, Bridger
[1] http://docs.basex.org/wiki/Commands#EXPORT [2] http://docs.basex.org/wiki/Database_Module#db:export
basex-talk@mailman.uni-konstanz.de