The FormatXML case class provides a specialized implementation for formatting content in XML-like structures. It inherits from BaseFormat and offers additional functionality for handling XML-specific formatting operations, including indentation, flattening, delimiters, and opening/closing tag formatting.
Value parameters
- flat
-
A boolean flag indicating whether the format should be flattened, eliminating structural indentation.
- indents
-
The number of indentation levels to be applied in formatting.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass BaseFormattrait Formatclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Provides the delimiter string used for formatting in the FormatXML case class. The delimiter defines the space between elements in the formatted XML output.
Provides the delimiter string used for formatting in the FormatXML case class. The delimiter defines the space between elements in the formatted XML output.
Attributes
- Returns
-
A string representing the delimiter, which is a single space.
- Definition Classes
Transforms the current FormatXML instance into a flat format by setting the flat flag to true. This eliminates hierarchical indentation, resulting in a single-line layout.
Transforms the current FormatXML instance into a flat format by setting the flat flag to true. This eliminates hierarchical indentation, resulting in a single-line layout.
Attributes
- Returns
-
A new
Formatinstance with theflatproperty set totrue. - Definition Classes
-
BaseFormat -> Format
Formats the name based on the given rendering state and the optional opening or closing tag context.
Formats the name based on the given rendering state and the optional opening or closing tag context.
Type parameters
- T
-
The type whose class name may be retrieved if no name is provided in the rendering state.
Value parameters
- open
-
An optional Boolean indicating the context of formatting: Some(true) for an opening tag, Some(false) for a closing tag, or None for an inline separator.
- stateR
-
The rendering state that may include an optional name or other formatting context.
Attributes
- Returns
-
A formatted string representing the name or tag, appropriately formatted based on the given state and context.
Increases the indentation level by 1, creating a new Format instance with the updated indentation level.
Increases the indentation level by 1, creating a new Format instance with the updated indentation level.
Attributes
- Returns
-
A new
Formatinstance with theindentsvalue incremented by 1.
Determines the appropriate string separator based on the provided optional boolean value.
Determines the appropriate string separator based on the provided optional boolean value.
Value parameters
- open
-
An optional Boolean value: Some(true) or Some(false) returns an empty string, None returns a newline character ("\n").
Attributes
- Returns
-
A string representing the separator for formatting, either "" or "\n".
Inherited methods
Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.
Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.
Attributes
- Returns
-
A formatted string consisting of a newline character followed by the appropriate level of indentation.
- Inherited from:
- BaseFormat
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Concrete fields
Represents the name of the format associated with this case class. This value is used to identify the formatting type, specifically "FormatXML".
Represents the name of the format associated with this case class. This value is used to identify the formatting type, specifically "FormatXML".