jlibs.xml.xsl
Class TransformerUtil
java.lang.Object
jlibs.xml.xsl.TransformerUtil
public class TransformerUtil
- extends Object
This class contains utility method related to transformation
- Author:
- Santhosh Kumar T
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OUTPUT_KEY_INDENT_AMOUT
public static final String OUTPUT_KEY_INDENT_AMOUT
- See Also:
- Constant Field Values
TransformerUtil
public TransformerUtil()
setOutputProperties
public static Transformer setOutputProperties(Transformer transformer,
boolean omitXMLDeclaration,
int indentAmount,
String encoding)
- to set various output properties on given transformer.
- Parameters:
transformer - transformer on which properties are setomitXMLDeclaration - omit xml declaration or notindentAmount - the number fo spaces used for indentation.
use <=0, in case you dont want indentationencoding - required encoding. use null to don't set any encoding
- Returns:
- the same transformer which is passed as argument
newTransformer
public static Transformer newTransformer(Source source,
boolean omitXMLDeclaration,
int indentAmount,
String encoding)
throws TransformerConfigurationException
- Creates Transformer
- Parameters:
source - source of xsl document, use null for identity transformeromitXMLDeclaration - omit xml declaration or notindentAmount - the number fo spaces used for indentation.
use <=0, in case you dont want indentationencoding - required encoding. use null to don't set any encoding
- Returns:
- the same transformer which is passed as argument
- Throws:
TransformerConfigurationException
newTransformerHandler
public static TransformerHandler newTransformerHandler(Source source,
boolean omitXMLDeclaration,
int indentAmount,
String encoding)
throws TransformerConfigurationException
- Creates TransformerHandler
- Parameters:
source - source of xsl document, use null for identity transformeromitXMLDeclaration - omit xml declaration or notindentAmount - the number fo spaces used for indentation.
use <=0, in case you dont want indentationencoding - required encoding. use null to don't set any encoding
- Returns:
- the same transformer which is passed as argument
- Throws:
TransformerConfigurationException
Copyright © 2015. All rights reserved.