簡體   English   中英

MarkLogic 8:無法使用cURL將XML文檔加載到MarkLogic數據庫

[英]MarkLogic 8: Cannot load a XML document to MarkLogic database using cURL

我正在嘗試加載具有內容的簡單XML文檔(我將其命名為one.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參數用於其他內容。

HTH!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM