[MarkLogic Dev General] How to output an XML file from MarkLogic
inUS-ASCII and with XML version declaration?
dsokolsky at marklogic.com
Thu Mar 19 12:37:08 PST 2009
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:
'<?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.
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Tim
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?
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
<?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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General