public static TransformerHandler createTransformerHandler(final ErrorListener errorListener,
                                                              final boolean indentOutput) throws TransformerConfigurationException {
        final SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactoryFactory.newInstance();
        if (errorListener != null) {
            stf.setErrorListener(errorListener);
        }

        final TransformerHandler th = stf.newTransformerHandler();
        final Transformer transformer = th.getTransformer();
        setCommonOutputProperties(transformer, indentOutput);

        if (errorListener != null) {
            transformer.setErrorListener(errorListener);
        }

        return th;
    }
Convert a java type into a xml name E.g. XMLType = "xmlType", String =
"string", StringBIG = "StringBIG"
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/XMLUtil.java