MarkLogic 8:无法使用 cURL 将 XML 文档加载到 MarkLogic 数据库



我正在练习加载一个简单的XML文档(我命名为一个.xml(,其中包含以下内容:

<one>
<child>The noble Brutus has told Caesar was ambitious</child>
</one>

到 MarkLogic DB。

我在 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语法,所以我按照此链接将其更改为Windows语法 https://docs.marklogic.com/8.0/guide/rest-dev/intro#id_75672

我认为这是一个问题。请帮助我

您输入了错误的-X参数,它必须是大写的 X.小写 x 参数用于其他内容。

哼!

最新更新