Java org.jdom2.output Format fields, constructors, methods, implement or subclass

Example usage for Java org.jdom2.output Format fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.jdom2.output Format.

The text is from its open source code.

Method

StringescapeAttribute(final EscapeStrategy strategy, final String value)
This will take the three pre-defined entities in XML 1.0 ('<', '>', and '&' - used specifically in XML elements) as well as CR/NL, tabs, and Quote characters which require escaping inside Attribute values and converts their character representation to the appropriate entity reference suitable for XML attribute content.
FormatgetCompactFormat()
Returns a new Format object that performs whitespace normalization, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
StringgetEncoding()
Returns the configured output encoding.
EscapeStrategygetEscapeStrategy()
Returns the current escape strategy
FormatgetPrettyFormat()
Returns a new Format object that performs whitespace beautification with 2-space indents, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
FormatgetRawFormat()
Returns a new Format object that performs no whitespace changes, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
FormatsetEncoding(String encoding)
Sets the output encoding.
FormatsetEscapeStrategy(EscapeStrategy strategy)
Sets the EscapeStrategy to use for character escaping.
FormatsetExpandEmptyElements(boolean expandEmptyElements)
This will set whether empty elements are expanded from <tagName/> to <tagName></tagName>.
FormatsetIndent(String indent)
This will set the indent String to use; this is usually a String of empty spaces.
FormatsetLineSeparator(String separator)
This will set the newline separator (LineSeparator).
FormatsetLineSeparator(LineSeparator separator)
This will set the newline separator sequence.
FormatsetOmitDeclaration(boolean omitDeclaration)
This will set whether the XML declaration (<?xml version="1.0"?>) will be omitted or not.
FormatsetOmitEncoding(boolean omitEncoding)
This will set whether the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) includes the encoding of the document.
FormatsetTextMode(Format.TextMode mode)
This sets the text output style.