1 package org.apache.axis2.wsdl.util; 2 3 4 import javax.xml.transform.*; 5 import javax.xml.transform.stream.StreamResult ; 6 import javax.xml.transform.stream.StreamSource ; 7 import java.io.InputStream ; 8 import java.io.OutputStream ; 9 10 11 29 public class XSLTTemplateProcessor { 30 31 39 public static void parse(OutputStream out,InputStream xmlStream,InputStream xsltStream) 40 throws TransformerFactoryConfigurationError,TransformerException { 41 Source xmlSource = new StreamSource (xmlStream); 42 Source xsltSource = new StreamSource (xsltStream); 43 Result result = new StreamResult (out); 44 Transformer transformer = TransformerFactory.newInstance().newTransformer(xsltSource); 45 transformer.transform(xmlSource, result); 46 47 } 48 49 50 51 } 52 | Popular Tags |