类 TransformerUtils
- java.lang.Object
- org.springframework.util.xml.TransformerUtils
public abstract class TransformerUtils extends Object
Contains common behavior relating toTransformersand thejavax.xml.transformpackage in general.- 从以下版本开始:
- 2.5.5
- 作者:
- Rick Evans, Juergen Hoeller
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_INDENT_AMOUNTThe indent amount of characters ifindenting is enabled.
构造器概要
构造器 构造器 说明 TransformerUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static 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.
字段详细资料
DEFAULT_INDENT_AMOUNT
public static final int DEFAULT_INDENT_AMOUNT
The indent amount of characters ifindenting is enabled.Defaults to "2".
- 另请参阅:
- 常量字段值
构造器详细资料
TransformerUtils
public TransformerUtils()
方法详细资料
enableIndenting
public static void enableIndenting(Transformer transformer)
Enable 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.- 参数:
transformer- the target transformer- 另请参阅:
Transformer.setOutputProperty(String, String),OutputKeys.INDENT
enableIndenting
public static void enableIndenting(Transformer transformer, int indentAmount)
Enable 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.- 参数:
transformer- the target transformerindentAmount- the size of the indent (2 characters, 3 characters, etc)- 另请参阅:
Transformer.setOutputProperty(String, String),OutputKeys.INDENT
disableIndenting
public static void disableIndenting(Transformer transformer)
Disable indenting for the suppliedTransformer.- 参数:
transformer- the target transformer- 另请参阅:
OutputKeys.INDENT