Is there an easy way to save/export/serialize an entire database to the
filesystem? (I don't mean CREATE BACKUP/RESTORE. I mean if you want to get
plain XML files for something outside of BaseX.)
I have been using this XQuery:
let $base := 'some/path/'
for $doc in db:open('dbname')
let $fn := $base || document-uri($doc)
let $dir := file:dir-name($fn)
return (
if (not(file:exists($dir))) then file:create-dir($dir) else (),
file:write($fn, $doc, map{"method":="xml"})
)
However this uses a large amount of memory so any large database needs to be
manually partitioned into multiple XQueries.
It seems like there should be a very simple way to do this.
--
Francis Avila
Web Developer
Dancing Mammoth, Inc.
(Formerly PJ Doland Web Design, Inc.)
E: [email protected]
http://dancingmammoth.com
_______________________________________________
BaseX-Talk mailing list
[email protected]
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk