Java org.dom4j.io OutputFormat fields, constructors, methods, implement or subclass

Example usage for Java org.dom4j.io OutputFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.dom4j.io OutputFormat.

The text is from its open source code.

Subclass

org.dom4j.io.OutputFormat has subclasses.
Click this link to see all its subclasses.

Constructor

OutputFormat()
Creates an OutputFormat with no additional whitespace (indent or new lines) added.
OutputFormat(String indent, boolean newlines, String encoding)
Creates an OutputFormat with the given indent added with optional newlines between the Elements and the given encoding format.
OutputFormat(String indent, boolean newlines)
Creates an OutputFormat with the given indent added with optional newlines between the Elements.

Method

OutputFormatcreateCompactFormat()
A static helper method to create the default compact format.
OutputFormatcreatePrettyPrint()
A static helper method to create the default pretty printing format.
StringgetEncoding()
StringgetIndent()
booleanisNewLineAfterDeclaration()
DOCUMENT ME!
booleanisOmitEncoding()
booleanisSuppressDeclaration()
DOCUMENT ME!
booleanisTrimText()
voidsetAttributeQuoteCharacter(char quoteChar)
Sets the character used to quote attribute values.
voidsetEncoding(String encoding)
DOCUMENT ME!
voidsetExpandEmptyElements(boolean expandEmptyElements)

This will set whether empty elements are expanded from <tagName> to <tagName></tagName>.

voidsetIndent(String indent)
This will set the indent String to use; this is usually a String of empty spaces.
voidsetIndent(boolean doIndent)
Set the indent on or off.
voidsetIndentSize(int indentSize)
This will set the indent String's size; an indentSize of 4 would result in the indention being equivalent to the String "    " (four space characters).
voidsetLineSeparator(String separator)

This will set the new-line separator.

voidsetNewLineAfterDeclaration(boolean newLineAfterDeclaration)

This will set whether a new line is printed after the XML declaration (assuming it is not supressed.)

voidsetNewLineAfterNTags(int tagCount)
Controls output of a line.separator every tagCount tags when isNewlines is false.
voidsetNewlines(boolean newlines)
DOCUMENT ME!
voidsetOmitEncoding(boolean omitEncoding)

This will set whether the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) includes the encoding of the document.

voidsetPadText(boolean padText)
Ensure that text immediately preceded by or followed by an element will be "padded" with a single space.
voidsetSuppressDeclaration(boolean suppressDeclaration)

This will set whether the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) is included or not.

voidsetTrimText(boolean trimText)
This will set whether the text is output verbatim (false) or with whitespace stripped as per org.dom4j.Element#getTextTrim() .
voidsetXHTML(boolean xhtml)
This will set whether or not to use the XHTML standard: like HTML but passes an XML parser with real, closed tags.