Hi Tim,
You can write a very simple xqy file to do this and execute it either
from an HTTP server or invoke it with an XCC program via an XDBC server.
First send the xml version identifier as text, then output the document.
Something like this:
xdmp:set-response-encoding("US-ASCII"),
xdmp:set-response-content-type("text/plain"),
'<?xml version="1.0" encoding="US-ASCII"?>',
fn:doc( "my-doc.xml" )
You can set the output encoding when running on an HTTP Server either in
the query (as above) or on the App Server configuration. In XCC, I
think there are options you can set in your XCC program. I don't know
of a way to do this via WebDAV.
-Danny
From: [email protected]
[mailto:[email protected]] On Behalf Of Tim
Meagher
Sent: Thursday, March 19, 2009 12:42 PM
To: 'General Mark Logic Developer Discussion'
Subject: [MarkLogic Dev General] How to output an XML file from
MarkLogic inUS-ASCII and with XML version declaration?
Hi folks,
I would like to export an XML file from MarkLogic database to a file
system. I do not want to export the file to the MarkLogic server file
system, so I'm led to believe that my choices are limited to using
WebDAV or an XCC application. It would simplest to do this using
WebDAV, but I also want to prepend the xml version identifier and output
the encoding as us-ascii (with all UTF-8 markup included using ascii
representation):
<?xml version="1.0" encoding="US-ASCII"?>
How would I go about doing this? Would setting the output encoding type
of the WebDAV app server to ASCII force the encoding?
Thank you!
Tim Megher
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general