本文整理了Java中org.dom4j.io.XPP3Reader.<init>()
方法的一些代码示例,展示了XPP3Reader.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPP3Reader.<init>()
方法的具体详情如下:
包路径:org.dom4j.io.XPP3Reader
类名称:XPP3Reader
方法名:<init>
暂无
代码示例来源:origin: org.compass-project/compass
protected XPP3Reader doCreateXPP3Reader(CompassSettings settings) {
return new XPP3Reader();
}
代码示例来源:origin: dom4j/dom4j
public void testRussian() throws Exception {
File file = getFile("/xml/russArticle.xml");
XPP3Reader xmlReader = new XPP3Reader();
Document doc = xmlReader.read(file);
Element el = doc.getRootElement();
StringWriter writer = new StringWriter();
XMLWriter xmlWriter = new XMLWriter(writer);
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("koi8-r");
xmlWriter.write(doc);
log(writer.toString());
}
代码示例来源:origin: dom4j/dom4j
public void testRussian2() throws Exception {
File file = getFile("/xml/russArticle.xml");
XPP3Reader xmlReader = new XPP3Reader();
Document doc = xmlReader.read(file);
XMLWriter xmlWriter = new XMLWriter(new OutputFormat("", false,
"koi8-r"));
ByteArrayOutputStream out = new ByteArrayOutputStream();
xmlWriter.setOutputStream(out);
xmlWriter.write(doc);
xmlWriter.flush();
xmlWriter.close();
log(out.toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!