我正在练习加载一个简单的 XML 文档(我将其命名为 one.xml),内容为:
<one>
<child>The noble Brutus has told Caesar was ambitious</child>
</one>
到 MarkLogic 数据库。
我在 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"
因此,如果请求成功,服务将返回状态 201(文档已创建)。 但什么也没发生。相反,我收到了 “curl --help” 命令的结果。
我遵循 MarkLogic 网站的说明。链接:https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_97899
向下滚动到MarkLogic REST API 入门一文。我卡在将文档加载到数据库
P/S: MarkLogic 网站的curl 命令行使用Unix 语法,所以我在这个链接https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_75672 将其更改为Windows 语法。
我觉得这是个问题。请帮助我
最佳答案
您打错了 -X
parameter , 它必须是大写 X。小写 x parameter用于其他用途..
喂!
关于xml - 马克逻辑 8 : Cannot load a XML document to MarkLogic database using cURL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52465556/