本文整理了Java中org.dom4j.io.OutputFormat.setLineSeparator()
方法的一些代码示例,展示了OutputFormat.setLineSeparator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.setLineSeparator()
方法的具体详情如下:
包路径:org.dom4j.io.OutputFormat
类名称:OutputFormat
方法名:setLineSeparator
[英]This will set the new-line separator. The default is \n
. Note that if the "newlines" property is false, this value is irrelevant. To make it output the system default line ending string, call setLineSeparator(System.getProperty("line.separator"))
[中]这将设置新的行分隔符。默认值为\n
。请注意,如果“newlines”属性为false,则该值不相关。要使其输出系统默认的行尾字符串,请调用setLineSeparator(System.getProperty("line.separator"))
代码示例来源:origin: org.dom4j/dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: org.mule.modules/mule-module-xml
/**
* @see OutputFormat#setLineSeparator(String)
*/
public synchronized void setLineSeparator(String separator)
{
outputFormat.setLineSeparator(separator);
}
代码示例来源:origin: maven/maven-model
/**
* Method write
*
* @param writer
* @param project
*/
public void write(Writer writer, Model project)
throws java.io.IOException
{
Document document = new DocumentFactory().createDocument();
writeModel( project, "project", document );
OutputFormat format = OutputFormat.createPrettyPrint();
format.setLineSeparator( System.getProperty( "line.separator" ) );
XMLWriter serializer = new XMLWriter( writer, format );
serializer.write( document );
} //-- void write(Writer, Model)
代码示例来源:origin: maven/maven-model
/**
* Method write
*
* @param writer
* @param project
*/
public void write(Writer writer, Model project)
throws java.io.IOException
{
Document document = new DocumentFactory().createDocument();
writeModel( project, "project", document );
OutputFormat format = OutputFormat.createPrettyPrint();
format.setLineSeparator( System.getProperty( "line.separator" ) );
XMLWriter serializer = new XMLWriter( writer, format );
serializer.write( document );
} //-- void write(Writer, Model)
代码示例来源:origin: stackoverflow.com
OutputFormat outPutFormat = new OutputFormat();
outPutFormat.setLineSeparator("");
outPutFormat.setExpandEmptyElements(true);
outPutFormat.setEncoding("UTF-8");
Dom4JDriver d4j = new Dom4JDriver(new XmlFriendlyNameCoder("_", "_"));
d4j.setOutputFormat(outPutFormat);
XStream xstream = new XStream(d4j);
xstream.autodetectAnnotations(true);
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: dom4j/dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: apache/servicemix-bundles
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: maven/dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
setNewlines(true);
} else if (args[i].equals("-lineSeparator")) {
setLineSeparator(args[++i]);
} else if (args[i].equals("-trimText")) {
setTrimText(true);
代码示例来源:origin: org.codehaus.plexus/plexus-appserver-runtime-builder
format.setLineSeparator( System.getProperty( "line.separator" ) );
conf = new File( "target/tmp/plexus.xml" );
conf.getParentFile().mkdirs();
内容来源于网络,如有侵权,请联系作者删除!