DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(new OutputStreamWriter(os));
transformer.transform(source, result);
} catch (TransformerConfigurationException ex) {
throw new PersistenceException("Unable to serialize perspectiveModel", ex);
} catch (TransformerException ex) {
throw new PersistenceException("Unable to serialize perspectiveModel", ex);
}
return true;
}