OutputFormat format = OutputFormat.createPrettyPrint(); //漂亮格式:有空格换行
format.setNewLineAfterDeclaration(false);
format.setSuppressDeclaration(true); //删除xml头
format.setExpandEmptyElements(true);
用setSuppressDeclaration(true)删除xml头后 发现setNewLineAfterDeclaration(false) 方法不起作用了
怎么解决这个问题:即去掉xml的头,又去掉第二行的空行