ByteArrayOutputStream myOutput = new ByteArrayOutputStream();
StreamResult myStream = new StreamResult(myOutput);
String whatEver = myOutput.toString();
private String transformationXMLXSL(File xml,File xsl)throws TransformerConfigurationException,TransformerException{
ByteArrayOutputStream out = new ByteArrayOutputStream();
Source xmlSource = new StreamSource(xml);
Source xslSource = new StreamSource(xsl);
TransformerFactory tfac = TransformerFactory.newInstance();
Transformer trans = tfac.newTransformer(xslSource);
trans.transform(xmlSource,new StreamResult(out));
return out.toString();
}