[英]MarkLogic 8: Cannot load a XML document to MarkLogic database using cURL
I'm practicing to load a simple XML document (I name it one.xml) with content: 我正在尝试加载具有内容的简单XML文档(我将其命名为one.xml):
<one>
<child>The noble Brutus has told Caesar was ambitious</child>
</one>
to MarkLogic DB. 到MarkLogic DB。
I run curl tool (Windows cmd) at one.xml's directory and type the following command line: 我在one.xml的目录中运行curl工具(Windows cmd)并键入以下命令行:
curl --anyauth --user user:password -x put -d@"./one.xml" ^
-h "Content-type: application/xml" ^
"http://localhost:8000/LATEST/documents?uri=/xml/one.xml"
So if the request succeeds, the service returns status 201 (Document Created). 因此,如果请求成功,该服务将返回状态201(文档已创建)。 But nothing happened.
但是什么也没发生。 Instead, I received the results of the "curl --help" command.
相反,我收到了“ curl --help”命令的结果。
I folllow the instructions of MarkLogic website. 我遵循MarkLogic网站的说明。 Link: https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_97899
链接: https : //docs.marklogic.com/8.0/guide/rest-dev/intro#id_97899
Scroll down to the Getting Started with the MarkLogic REST API article. 向下滚动至“ MarkLogic REST API入门”一文。 I am stuck at Load Documents Into the Database
我被困在将文档加载到数据库中
P/S: The curl command line in the MarkLogic website use Unix syntax, so I changed it to Windows syntax following this link https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_75672 P / S:MarkLogic网站中的curl命令行使用Unix语法,因此我通过以下链接将其更改为Windows语法https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_75672
I think this is a problem. 我认为这是一个问题。 Please help me
请帮我
You mistyped the -X
parameter , it must be upper-case X. Lower-case x parameter is used for something else.. 您输错了
-X
参数 ,它必须是大写的X。小写的x参数用于其他内容。
HTH! HTH!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.