tr.setOutputProperty(OutputKeys.INDENT, "yes");
tr.setOutputProperty(OutputKeys.METHOD, "xml");
tr.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(indent));
tr.transform(new DOMSource(getDOM(xmlObject)), new StreamResult(outputStream));
} catch (TransformerConfigurationException e) {
throw new XMLObjectException(e);
} catch (TransformerException e) {
throw new XMLObjectException(e);
}
}