本文整理了Java中org.dom4j.io.OutputFormat.isNewLineAfterDeclaration()
方法的一些代码示例,展示了OutputFormat.isNewLineAfterDeclaration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.isNewLineAfterDeclaration()
方法的具体详情如下:
包路径:org.dom4j.io.OutputFormat
类名称:OutputFormat
方法名:isNewLineAfterDeclaration
[英]DOCUMENT ME!
[中]记录我!
代码示例来源:origin: igniterealtime/Openfire
/**
* <p>
* This will write the declaration to the given Writer.
* Assumes XML version 1.0 since we don't directly know.
* </p>
*/
protected void writeDeclaration() throws IOException {
String encoding = format.getEncoding();
// Only print of declaration is not suppressed
if (! format.isSuppressDeclaration()) {
// Assume 1.0 version
if (encoding.equals("UTF8")) {
writer.write("<?xml version=\"1.0\"");
if (!format.isOmitEncoding()) {
writer.write(" encoding=\"UTF-8\"");
}
writer.write("?>");
} else {
writer.write("<?xml version=\"1.0\"");
if (! format.isOmitEncoding()) {
writer.write(" encoding=\"" + encoding + "\"");
}
writer.write("?>");
}
if (format.isNewLineAfterDeclaration()) {
println();
}
}
}
代码示例来源:origin: org.dom4j/dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.mule.modules/mule-module-xml
/**
* @see OutputFormat#isNewLineAfterDeclaration()
*/
public synchronized boolean isNewLineAfterDeclaration()
{
return outputFormat.isNewLineAfterDeclaration();
}
代码示例来源:origin: dom4j/dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
/**
* <p>
* This will write the declaration to the given Writer.
* Assumes XML version 1.0 since we don't directly know.
* </p>
*/
protected void writeDeclaration() throws IOException {
String encoding = format.getEncoding();
// Only print of declaration is not suppressed
if (! format.isSuppressDeclaration()) {
// Assume 1.0 version
if (encoding.equals("UTF8")) {
writer.write("<?xml version=\"1.0\"");
if (!format.isOmitEncoding()) {
writer.write(" encoding=\"UTF-8\"");
}
writer.write("?>");
} else {
writer.write("<?xml version=\"1.0\"");
if (! format.isOmitEncoding()) {
writer.write(" encoding=\"" + encoding + "\"");
}
writer.write("?>");
}
if (format.isNewLineAfterDeclaration()) {
println();
}
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: apache/servicemix-bundles
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
if (format.isNewLineAfterDeclaration()) {
println();
代码示例来源:origin: maven/dom4j
if (format.isNewLineAfterDeclaration()) {
println();
内容来源于网络,如有侵权,请联系作者删除!