1
下正常工作:MarkLogic Java API - 帶有JAXB的QueryManager?
XMLDocumentManager docMgr = client.newXMLDocumentManager();
JAXBContext context = JAXBContext.newInstance(Document.class);
JAXBHandle jaxbHandle = new JAXBHandle(context);
docMgr.read(
"/masters/1337-12/t/1439-1074_2013_2_toc.xml",
jaxbHandle);
Assert.assertNotNull(jaxbHandle);
Document document = (Document) jaxbHandle.get();
但如果我不知道文檔的URI我可以做我必須做一個搜索類似以下內容:
StructuredQueryBuilder qb = new StructuredQueryBuilder(
"OPTIONS_NAME");
StructuredQueryDefinition querydef = qb.valueConstraint("tocId",
tocId);
// contains RAW data -
StringHandle resultsHandle = queryMgr.search(querydef, new StringHandle());
我怎樣才能改變這個結果與JAXB?
好..因爲JAVA API很慢(現在測試過)我切換到XCC .. – user1731299
我很想知道如何更好地理解Java API的性能不符合您的期望。你能提供更多細節嗎? –