我尝试了下面提到的 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>)
如何提供共享路径位置而不是本地系统路径?
最佳答案
有两点需要注意:
- 安装 MarkLogic 的路径必须可见。也就是说,如果您在远程服务器上加载,请记住 MarkLogic 将查看该服务器上的文件系统
- 使用反斜杠作为 Windows 路径,as seen in the first and third examples 。
XQuery:
xdmp:document-load("D:\scrape\100065.xml",
<options xmlns="xdmp:document-load">
<uri>/April/12/100065.xml</uri>
<encoding>auto</encoding>
</options>
)
关于xquery - marklogic 6 - 如何将 xml 文档从共享路径位置加载到 marklogic DB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36564625/