Package org.springframework.util.xml
Class TransformerUtils
java.lang.Object
org.springframework.util.xml.TransformerUtils
Contains common behavior relating to 
Transformers
 and the javax.xml.transform package in general.- Since:
- 2.5.5
- Author:
- Rick Evans, Juergen Hoeller
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe indent amount of characters ifindenting is enabled.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voiddisableIndenting(Transformer transformer) Disable indenting for the suppliedTransformer.static voidenableIndenting(Transformer transformer) Enable indenting for the suppliedTransformer.static voidenableIndenting(Transformer transformer, int indentAmount) Enable indenting for the suppliedTransformer.
- 
Field Details- 
DEFAULT_INDENT_AMOUNTpublic static final int DEFAULT_INDENT_AMOUNTThe indent amount of characters ifindenting is enabled.Defaults to "2". - See Also:
 
 
- 
- 
Constructor Details- 
TransformerUtilspublic TransformerUtils()
 
- 
- 
Method Details- 
enableIndentingEnable indenting for the suppliedTransformer.If the underlying XSLT engine is Xalan, then the special output key indent-amountwill be also be set to a value ofDEFAULT_INDENT_AMOUNTcharacters.- Parameters:
- transformer- the target transformer
- See Also:
 
- 
enableIndentingEnable indenting for the suppliedTransformer.If the underlying XSLT engine is Xalan, then the special output key indent-amountwill be also be set to a value ofDEFAULT_INDENT_AMOUNTcharacters.- Parameters:
- transformer- the target transformer
- indentAmount- the size of the indent (2 characters, 3 characters, etc.)
- See Also:
 
- 
disableIndentingDisable indenting for the suppliedTransformer.- Parameters:
- transformer- the target transformer
- See Also:
 
 
-