Hi Chetan,

Sorry for the late reply.

> Is there a way to make system call from xquery like move
> files from one directory to another, call shell scripts etc?

MarkLogic has some filesystem functions. You can use xdmp:filesystem-directory 
to get file listings, use xdmp:filesystem-file to read a file as plain text, 
use xdmp:document-get/insert to get text, binary or xml and insert into the 
database (or use xdmp:document-load to do both in one call), and use xdmp:save 
to write information back to the file system.

A description of these functions can be found here:

http://developer.marklogic.com/pubs/4.1/apidocs/All.html

There is however no way to delete files or folders, nor a way to create 
directories that way. To my knowledge it is not possible to do system-calls 
from Xquery either, but you can delegate such tasks to a second webservice is 
you like. You could use MLJAM for that, but you have to consider security when 
taking this approach. More on MLJAM can be found here: 
http://developer.marklogic.com/code/

You might like to consider putting a Java-layer (or .Net-layer) between 
MarkLogic Server and the front-end. Then you can do filesystem stuff in there 
and do only database things in xquery.

> Can MarkLogic pull data from FTP site?

To my knowledge, no. But you could do that in the Java-layer as well. It can 
retrieve content through HTTP(S) though, perhaps that is a suitable alternative?

Kind regards,
Geert


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.



_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to