【发布时间】:2016-04-21 12:28:11
【问题描述】:
我在我的 java 应用程序中使用 Jena (apache-jena-libs 3.0.1) 来创建 RDF 模型并序列化为 RDF/XML。我使用的方式与https://jena.apache.org/documentation/io/rdfxml_howto.html
中记录的方式相同FileOutputStream out = new FileOutputStream( new File(dir, filename + ".xml") );
RDFWriter rdfWriter = notificationModel.getWriter("RDF/XML-ABBREV");
rdfWriter.setProperty("showXmlDeclaration", "true");
rdfWriter.setProperty("showDoctypeDeclaration", "true");
rdfWriter.write(notificationModel, out, null);
但是,作者忽略了任何属性,它们对生成的 XML 没有影响。有什么想法吗?
【问题讨论】:
标签: java xml rdf jena apache-jena