public String transformToString ( ) { StringWriter sw = new StringWriter ( ) ; transformTo ( new StreamResult ( sw ) ) ; return sw . toString ( ) ; }
Convenience method that returns the result of the transformation as a String .