Java Utililty Methods XML Transform

List of utility methods to do XML Transform

Description

The list of methods to do XML Transform are organized into topic(s).

Method

TransformergetTransformer(StreamSource streamSource)
get Transformer
System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = null;
try {
    if (streamSource != null) {
        transformer = tFactory.newTransformer(streamSource);
    } else {
        transformer = tFactory.newTransformer();
...
TransformerFactorygetTransformerFactory()
Convenience method to get a new instance of a TransformerFactory.
TransformerFactory factory = TransformerFactory.newInstance();
if (factory.getClass().getName().equals("net.sf.saxon.TransformerFactoryImpl")) {
    factory.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE);
return factory;
javax.xml.transform.TransformerFactorygetTransformerFactory()
get Transformer Factory
if (s_transformerFactory != null) {
} else {
    s_transformerFactory = javax.xml.transform.TransformerFactory.newInstance();
    s_transformerFactory.setAttribute("indent-number", new Integer(2));
return s_transformerFactory;
TransformerFactorygetTransformerFactory()
Returns a new TransformerFactory  (TrAX implementation).
System.setProperty(PROPERTY_TRAX_IMPLEMENTATION, SAXON_TRAX_CLASS);
return TransformerFactory.newInstance();
TransformerFactorygetTransformerFactory()
get Transformer Factory
if (TRANSFORMER_FACTORY == null) {
    TRANSFORMER_FACTORY = TransformerFactory.newInstance();
return TRANSFORMER_FACTORY;
TransformerFactorygetTransformerFactory()

Creates a TransformerFactory .

if (transformerFactory == null) {
    transformerFactory = TransformerFactory.newInstance();
return transformerFactory;
TemplatesgetTransformerTemplate(javax.xml.transform.Source xsltSource)
get Transformer Template
return transformerFactory.newTemplates(xsltSource);
TransformParameterSpecgetTransformParameterSpec(final Node transformNode, final String namespacePrefix)
Recupera los parámetros de una transformación.
TransformParameterSpec params = null;
final String algorithm = getTransformAlgorithm(transformNode);
if (algorithm != null && (Transform.XPATH.equals(algorithm) || Transform.XPATH2.equals(algorithm))) {
    if (Transform.XPATH.equals(algorithm)) {
        final NodeList xpathTransforms = transformNode.getChildNodes();
        for (int i = 0; i < xpathTransforms.getLength(); i++) {
            final Node xpathTransformNode = xpathTransforms.item(i);
            if ("XPath".equals(xpathTransformNode.getNodeName()) 
...
ListgetTransforms(List list)
get Transforms
return list;
TransformergetXmlSecureTransform()
get Xml Secure Transform
Transformer transformer = getXmlSecureTransformerFactory().newTransformer();
return transformer;