Package au.com.acegi.xmlformat
Class XmlOutputFormat
- java.lang.Object
-
- org.dom4j.io.OutputFormat
-
- au.com.acegi.xmlformat.XmlOutputFormat
-
- All Implemented Interfaces:
java.lang.Cloneable
public class XmlOutputFormat extends org.dom4j.io.OutputFormatExtended DOM4J configuration.- Defaults to pretty print.
- Adds an option to keep blank lines.
-
-
Field Summary
Fields Modifier and Type Field Description private booleankeepBlankLines
-
Constructor Summary
Constructors Constructor Description XmlOutputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisKeepBlankLines()When set to true, preserves at most one blank line between tags, if it was alredy present in the input file.voidsetKeepBlankLines(boolean keepBlankLines)When set to true, preserves at most one blank line between tags, if it was alredy present in the input file.-
Methods inherited from class org.dom4j.io.OutputFormat
createCompactFormat, createPrettyPrint, getAttributeQuoteCharacter, getEncoding, getIndent, getLineSeparator, getNewLineAfterNTags, isExpandEmptyElements, isNewLineAfterDeclaration, isNewlines, isOmitEncoding, isPadText, isSuppressDeclaration, isTrimText, isXHTML, parseOptions, setAttributeQuoteCharacter, setEncoding, setExpandEmptyElements, setIndent, setIndent, setIndentSize, setLineSeparator, setNewLineAfterDeclaration, setNewLineAfterNTags, setNewlines, setOmitEncoding, setPadText, setSuppressDeclaration, setTrimText, setXHTML
-
-
-
-
Method Detail
-
isKeepBlankLines
public boolean isKeepBlankLines()
When set to true, preserves at most one blank line between tags, if it was alredy present in the input file. Defaults tofalse.- Returns:
- Whether blank lines are preserved, or not.
-
setKeepBlankLines
public void setKeepBlankLines(boolean keepBlankLines)
When set to true, preserves at most one blank line between tags, if it was alredy present in the input file.- Parameters:
keepBlankLines- true to preserve at most one blank line, false to remove all blank lines.
-
-