class XMLUtils {

    public static String transformXML(final InputStream xml, final InputStream xslt) throws TransformerConfigurationException, TransformerException {
        TransformerFactory tFact = TransformerFactory.newInstance();
        Transformer transformer = tFact.newTransformer(new StreamSource(xslt));
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        transformer.transform(
                new StreamSource(xml),
                new StreamResult(bos)
            );
        String transformedXML = bos.toString();
        return transformedXML;
    }

    private  XMLUtils();

}