TransformerFactory factory = TransformerFactory.newInstance(); Source xsltSource = new StreamSource(...); // or a different Source implementation around the XSLT source Transformer transformer = factory.newTransformer(xsltSource); Source xmlSource = new StreamSource(...); // or a different Source implementation around the XML source Result htmlResult = new StreamResult(...); // or a different Result implementation for the HTML output transformer.transform(xmlSource, htmlResult);