spring-framework / org.springframework.util.xml / TransformerUtils / enableIndenting

enableIndenting

open static fun enableIndenting(transformer: Transformer): Unit

Enable indenting for the supplied javax.xml.transform.Transformer.

If the underlying XSLT engine is Xalan, then the special output key indent-amount will be also be set to a value of characters.

Parameters

transformer - the target transformer

See Also
javax.xml.transform.Transformer#setOutputProperty(String, String)javax.xml.transform.OutputKeys#INDENT

open static fun enableIndenting(transformer: Transformer, indentAmount: Int): Unit

Enable indenting for the supplied javax.xml.transform.Transformer.

If the underlying XSLT engine is Xalan, then the special output key indent-amount will be also be set to a value of characters.

Parameters

transformer - the target transformer

indentAmount - the size of the indent (2 characters, 3 characters, etc.)

See Also
javax.xml.transform.Transformer#setOutputProperty(String, String)javax.xml.transform.OutputKeys#INDENT