0
votes

I want to load the Document from my Pc (File system) to MarkLogic Database using curl command. I am creating a simple XML file and saving it in my filesystem . Using the below curl command , loading that file to the marklogic server.

curl --anyauth --user user:password -X PUT -d@'./one.xml' -H "Content-type: application/xml" "http://localhost:8000/LATEST/documents?uri=/xml/one.xml"

but my file is in [C:/mls-projects/one.xml ] where can I add my path ??

I'm getting error like this enter image description here

1
Please embed your code as a part of your question instead of a link to an image. - RyanNerd
Did you try windows style path: c:\mls-projects\one.xml? - grtjn

1 Answers

1
votes

In the "-d" option of Curl specify proper path where your xml document is located on the filesystem. Right now, you have './one.xml' which is looking for one.xml in the current folder where you're running Curl from (C:\Users\susai).

Alternatively, copy that file over to your current folder and try agin.