StreamResult sr = new StreamResult(entityStream);
transformerFactory.provide().newTransformer().transform(source, sr);
} catch (SAXException ex) {
throw new InternalServerErrorException(ex);
} catch (ParserConfigurationException ex) {
throw new InternalServerErrorException(ex);
} catch (TransformerException ex) {
throw new InternalServerErrorException(ex);
}
}