将XML文档插入marklogic数据库时如何编码@符号

时间:2019-02-13 05:57:20

标签: java xml marklogic

我正在尝试将以下文档插入marklogic数据库

<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Name>Ram</Name>
<Email>ram@ml.com</Email>
</Data>

使用marklogic客户端api版本3.0.5

我遇到了异常,我没有找到@符号的任何编码。

 com.marklogic.client.FailedRequestException: Local message: write failed: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: Unexpected character "@" in start tag at  line 1
            at com.marklogic.client.impl.JerseyServices.putPostDocumentImpl(JerseyServices.java:1394)
            at com.marklogic.client.impl.JerseyServices.putDocument(JerseyServices.java:1196)
            at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:836)
            at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:708)
            at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:638)

0 个答案:

没有答案