Sudhan Hunt
Sudhan Hunt

Reputation: 1

Need solution regarding MarkLogic Curl command

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

Upvotes: 0

Views: 136

Answers (1)

SašaM
SašaM

Reputation: 416

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.

Upvotes: 1

Related Questions