Several modes are available to effect the way textual content is printed. See the documentation for TextMode for details.
|
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. Tweaks can be made to the returned Format instance without affecting other instances.
|
|
Returns the configured output encoding.
|
|
Returns the current escape strategy
|
|
Returns whether empty elements are expanded.
|
|
Returns whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored.
|
|
Returns the indent string in use.
|
|
Returns the current line separator.
|
|
Returns whether the XML declaration will be omitted.
|
|
Returns whether the XML declaration encoding will be omitted.
|
|
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. Tweaks can be made to the returned Format instance without affecting other instances.
|
|
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. Tweaks can be made to the returned Format instance without affecting other instances.
|
|
Returns the current text output style.
|
|
Sets the output encoding. The name should be an accepted XML encoding.
|
|
Sets the EscapeStrategy to use for character escaping.
|
|
This will set whether empty elements are expanded from
|
|
This will set whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored. Disabling output escaping allows using XML text as element content and outputing it verbatim, i.e. as element children would be.
When processed, these processing instructions are removed from the generated XML text and control whether the element text content is output verbatim or with escaping of the pre-defined entities in XML 1.0. The text to be output verbatim shall be surrounded by the When ignored, the processing instructions are present in the generated XML text and the pre-defined entities in XML 1.0 are escaped.
Default:
|
|
This will set the indent
|
|
This will set the newline separator (
To output "UNIX-style" documents, call Note that this only applies to newlines generated by the outputter. If you parse an XML document that contains newlines embedded inside a text node, and you do not set TextMode.NORMALIZE, then the newlines will be output verbatim, as "\n" which is how parsers normalize them.
|
|
This will set whether the XML declaration (
|
|
This will set whether the XML declaration (
|
|
This sets the text output style. Options are available as static TextMode instances. The default is TextMode#PRESERVE.
|
|
The encoding format |
|
entity escape logic |
|
Whether or not to expand empty elements to <tagName></tagName> - default is |
|
Whether TrAX output escaping disabling/enabling PIs are ignored or processed - default is |
|
The default indent is no spaces (as original document) |
|
New line separator |
|
text handling mode |
|
Whether or not to output the XML declaration
|
|
Whether or not to output the encoding in the XML declaration
|