This is not highly tested code, but the MarkLogic extension for xmlsh (http://www.xmlsh.org/ModuleMarkLogic ) can do this pretty trivially. I just tested this on my own dataset
############# import module ml=marklogic for i in $(ml:list) ; do ml:get $i > $i done ############ if your URI's contain directory parts then you'd have to thow in some mkdir's ---------------------------------------- David A. Lee Senior Principal Software Engineer Epocrates, Inc. [email protected] 812-482-5224 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Sewell Sent: Thursday, August 06, 2009 11:08 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] Export of XML from Marklogic Coincidentally, Jakob Fix just posted a question about XQSync. It is a good tool to use when you want to copy a large portion, or all, of a MarkLogic database to a filesystem (local or remote): http://developer.marklogic.com/howto/tutorials/2006-08-xqsync.xqy It has a rather difficult syntax but works beautifully with large collections of files. The other, simpler option is to associate a WebDAV server with your database, and then you can just use your operating system's file windows (OS X Finder, Windows Explore, etc.) to copy files from the server to the client. There's a chapter on setting up a WebDAV server in the Admin guide: http://developer.marklogic.com/pubs/4.1/books/admin.pdf On Thu, 6 Aug 2009, Laurens van den Oever wrote: > Hi Gerald, > I have used xdmp:save for that purpose. For a small database you can > iterate over all your files but eventually your query will timeout. In > my case I just split the collection in a few batches. > > I would be interested in a pattern to run this type of query as a > sequence of transactions. > Maybe someone else can comment on that? > > Best regards, > > Laurens van den Oever > Xopus BV > > http://xopus.com +31 70 4452345 KvK 27301795 > > 2009/8/6 Goldsmith, Gerald CAR <[email protected]> > > > Greetings, > > > > Would anyone be so kind as to inform me how I might export XML > > content from Marklogic to an XML file? If possible, I would like to > > export all of the content to XML files. > > > > Thanks. > > > > Best Regards, > > > > Gerald Goldsmith > > > > Software Applications Engineer > > > > CAD Architect Carrier Corporation > > > > 9300 Harris Corners Parkway > > > > Suite 200 > > > > Charlotte, NC 28269 > > > > 704.494.2552 > > ****** > > > > *****Everything should be made as simple as possible, but not > > simpler.* – Albert Einstein > > > > > > _______________________________________________ > > General mailing list > > [email protected] > > http://xqzone.com/mailman/listinfo/general > > > > > -- David Sewell, Editorial and Technical Manager ROTUNDA, The University of Virginia Press PO Box 801079, Charlottesville, VA 22904-4318 USA Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903 Email: [email protected] Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
