简体   繁体   English

marklogic 6-如何将XML文档从共享路径位置加载到marklogic DB

[英]marklogic 6 - How to load the xml document from share path location to marklogic DB

I have tried the below mentioned Xquery for load the XML file from local system to MarkLogic database: 我已经尝试了下面提到的Xquery将XML文件从本地系统加载到MarkLogic数据库:

xdmp:document-load("D:/scrape/100065.xml",
  <options xmlns="xdmp:document-load">
    <uri>/April/12/100065.xml</uri>
    <encoding>auto</encoding>
     </options>)

How to provide the share path location instead of local system path? 如何提供共享路径位置而不是本地系统路径?

Two things to note: 有两件事要注意:

  • the path must be visible where MarkLogic is installed. 该路径在安装MarkLogic的位置必须可见。 That is, if you're loading on a remote server, remember that MarkLogic will look at the filesystem on that server 也就是说,如果要在远程服务器上加载,请记住MarkLogic将查看该服务器上的文件系统
  • use backslashes for the Windows path, as seen in the first and third examples . 在Windows路径中使用反斜杠, 如第一个和第三个示例所示

XQuery: XQuery的:

xdmp:document-load("D:\scrape\100065.xml",
  <options xmlns="xdmp:document-load">
    <uri>/April/12/100065.xml</uri>
   <encoding>auto</encoding>
  </options>
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM