XmlFormatOptions
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.options.IEditOptions
public final class XmlFormatOptions implements IEditOptions
Contains options, that allow to adjust the formatting of XML document, when it is represented as HTML
Methods
Method | Description |
---|---|
getEachAttributeFromNewline() | When enabled, each and every pair of attribute-value in every XML element will be placed on a new line. |
setEachAttributeFromNewline(boolean value) | When enabled, each and every pair of attribute-value in every XML element will be placed on a new line. |
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. |
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. |
getLeftIndent() | Allows to specify an offset for the left indent of every new line. |
setLeftIndent(Length value) | Allows to specify an offset for the left indent of every new line. |
isDefault() | Indicates whether this instance of XML formatting options has a default value |
getEachAttributeFromNewline()
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) \u2014 all attribute-value pairs are placed in a single line.
Returns: boolean
setEachAttributeFromNewline(boolean 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) \u2014 all attribute-value pairs are placed in a single line.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getLeafTextNodesOnNewline()
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) \u2014 leaf text nodes are placed on the same line as their parents, without new indent.
Returns: boolean
setLeafTextNodesOnNewline(boolean value)
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) \u2014 leaf text nodes are placed on the same line as their parents, without new indent.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getLeftIndent()
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
Returns: Length
setLeftIndent(Length value)
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
Parameters:
Parameter | Type | Description |
---|---|---|
value | Length |
isDefault()
public final boolean isDefault()
Indicates whether this instance of XML formatting options has a default value
Returns: boolean