public final class XmlFormatOptions extends Object implements IEditOptions
Contains options, that allow to adjust the formatting of XML document, when it is represented as HTML
| Modifier and Type | Method and Description |
|---|---|
boolean |
getEachAttributeFromNewline()
When enabled, each and every pair of attribute-value in every XML element will be placed on a new line.
|
boolean |
getLeafTextNodesOnNewline()
When enabled, leaf text nodes (textual content inside XML elements, that has no children) will be rendered on a new line with bigger left indent.
|
Length |
getLeftIndent()
Allows to specify an offset for the left indent of every new line.
|
boolean |
isDefault()
Indicates whether this instance of XML formatting options has a default value
|
void |
setEachAttributeFromNewline(boolean value)
When enabled, each and every pair of attribute-value in every XML element will be placed on a new line.
|
void |
setLeafTextNodesOnNewline(boolean value)
When enabled, leaf text nodes (textual content inside XML elements, that has no children) will be rendered on a new line with bigger left indent.
|
void |
setLeftIndent(Length value)
Allows to specify an offset for the left indent of every new line.
|
public final boolean getEachAttributeFromNewline()
When enabled, each and every pair of attribute-value in every XML element will be placed on a new line. By default is false (disabled) — all attribute-value pairs are placed in a single line.
public final boolean getLeafTextNodesOnNewline()
When enabled, leaf text nodes (textual content inside XML elements, that has no children) will be rendered on a new line with bigger left indent. By default is false (disabled) — leaf text nodes are placed on the same line as their parents, without new indent.
public final Length getLeftIndent()
Allows to specify an offset for the left indent of every new line. Cannot be a unitless non-zero value. By default is 10pt
IllegalArgumentException - Specified length value is unitless non-zeropublic final boolean isDefault()
Indicates whether this instance of XML formatting options has a default value
public final void setEachAttributeFromNewline(boolean value)
When enabled, each and every pair of attribute-value in every XML element will be placed on a new line. By default is false (disabled) — all attribute-value pairs are placed in a single line.
public final void setLeafTextNodesOnNewline(boolean value)
When enabled, leaf text nodes (textual content inside XML elements, that has no children) will be rendered on a new line with bigger left indent. By default is false (disabled) — leaf text nodes are placed on the same line as their parents, without new indent.
public final void setLeftIndent(Length value)
Allows to specify an offset for the left indent of every new line. Cannot be a unitless non-zero value. By default is 10pt
IllegalArgumentException - Specified length value is unitless non-zeroCopyright © 2024. All rights reserved.