public static String prettyPrint(SQLXML xml) throws SQLException {
try {
TransformerFactory transFactory = TransformerFactory.newInstance();
transFactory.setAttribute("indent-number", new Integer(2)); //$NON-NLS-1$
Transformer tf = transFactory.newTransformer();
tf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //$NON-NLS-1$
tf.setOutputProperty(OutputKeys.ENCODING, "UTF-8");//$NON-NLS-1$
tf.setOutputProperty(OutputKeys.INDENT, "yes");//$NON-NLS-1$
tf.setOutputProperty(OutputKeys.METHOD, "xml");//$NON-NLS-1$
tf.setOutputProperty(OutputKeys.STANDALONE, "yes");//$NON-NLS-1$