换行符"\r\n",如是用dom4j之类的jar包操作,dom4j换行如下
/**
* 通过 org.dom4j.io.OutputFormat 来设置XML文档输出格式
*/
OutputFormat format = OutputFormat.createPrettyPrint(); //设置XML文档输出格式
format.setEncoding("GB2312"); //设置XML文档的编码类型
format.setSuppressDeclaration(true);
format.setIndent(true); //设置是否缩进
format.setIndent(" "); //以空格方式实现缩进
format.setNewlines(true); //设置是否换行