Reputation: 177
I have some xml
files in my local system drive and I want to load these xml
files in remote Marklogic
server 4.2 which I access by IP address and password. But, I try to upload directly by using database
or by xquery
code it show below error so is there any solution without WebDAV
server to load xml
files in remote marklogic database?
Error:-
Invalid input: SVC-DIROPEN: xdmp:filesystem-directory("D:\Application\xml") -- Directory open error: FindFirstFile 'D:\Application\xml\*': The system cannot find the path specified.
[1.0-ml] SVC-FILOPN: xdmp:document-get("file://D:/Application/xml/ch001s001.xml", <options xmlns="xdmp:document-get"><encoding>UTF-8</encoding><repair>full</repair></options>) -- File open error: open '/Application/xml/ch001s001.xml': No such file or directory
Upvotes: 3
Views: 1142
Reputation: 20414
I think the problem is that the mentioned directory exists only on your local machine, and not on the remote server. The xdmp:filesystem-*, as well as functions like xdmp:document-get look on the filesystem relative to the server. So, 'c:\' would point to the c:\ path on the server, not your local machine.
You can use HTTP
PUT
or POST
requests to send your files to MarkLogic, but that requires an XQuery file that is able to take care of such requests. Other, perhaps easier options, involve setting up an XDBC
server, and using tools like RecordLoader, xmlsh, etc. to push your documents to MarkLogic. You can find these at http://developer.marklogic.com/.
HTH!
PS: what do you have against using WebDAV
? There are plenty libraries around that would be able to push content into MarkLogic using WebDAV
. There are even MarkLogic Ant tasks for that.
Upvotes: 4