public static Transformer getTransformer(ParseContext context) throws TikaException {

        Transformer transformer = context.get(Transformer.class);
        if (transformer != null) {
            return transformer;
        }

        return XMLReaderUtils.getTransformer();
    }
Returns the transformer specified in this parsing context.
<p>
If a transformer is not explicitly specified, then a default transformer
instance is created and returned. The default transformer instance is
configured to to use
{@link XMLConstants#FEATURE_SECURE_PROCESSING secure XML processing}.

@return Transformer
@throws TikaException when the transformer can not be created
tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java