I'm sorry; I wasn't really _trying_ to do anything, except to point out what I consider a bug. Thank-you for your reply.
On Tue, May 10, 2011 at 5:27 AM, Andreas Weiler < andreas.weiler@uni-konstanz.de> wrote:
Hi David,
the following query does what you trying to do (i guess):
declare option output:omit-xml-declaration "no"; put( copy $doc := doc("test.xml") modify insert node <testnew/> into $doc/root return $doc, "test2.xml")
Kind regards, Andreas
On 10.05.2011, at 07:11, David Reichle wrote:
I'm trying to do an update operation on a file using standalone cmdline
basex.
The xml-declaration get printed to stdout instead of to the updated file.
$cat test.xml
<?xml version="1.0" encoding="UTF-8"?>
<root> <test/> </root>
$cat test.xq declare option output:omit-xml-declaration "no";
let $root := doc("test.xml")/root return insert node <test/> into $root
$basex -u test.xq
$cat test.xml
<root> <test/> <test/> </root>
The declaration gets removed :<
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk