public abstract class

TransformerUtils

extends Object
java.lang.Object
   ↳ org.springframework.util.xml.TransformerUtils

Class Overview

Contains common behavior relating to javax.xml.transform.Transformer Transformers, and the javax.xml.transform package in general.

Summary

Constants
int DEFAULT_INDENT_AMOUNT The indent amount of characters if indenting is enabled.
Public Constructors
TransformerUtils()
Public Methods
static void disableIndenting(Transformer transformer)
Disable indenting for the supplied Transformer.
static void enableIndenting(Transformer transformer)
Enable indenting for the supplied Transformer.
static void enableIndenting(Transformer transformer, int indentAmount)
Enable indenting for the supplied Transformer.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_INDENT_AMOUNT

Also: SpringCore

The indent amount of characters if indenting is enabled.

Defaults to "2".

Constant Value: 2 (0x00000002)

Public Constructors

public TransformerUtils ()

Also: SpringCore

Public Methods

public static void disableIndenting (Transformer transformer)

Also: SpringCore

Disable indenting for the supplied Transformer.

Parameters
transformer the target transformer
See Also

public static void enableIndenting (Transformer transformer)

Also: SpringCore

Enable indenting for the supplied Transformer.

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

Parameters
transformer the target transformer

public static void enableIndenting (Transformer transformer, int indentAmount)

Also: SpringCore

Enable indenting for the supplied Transformer.

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

Parameters
transformer the target transformer
indentAmount the size of the indent (2 characters, 3 characters, etc.)