+ try {
+ StreamResult xmlOutput = new StreamResult(new StringWriter());
+ TransformerFactory.newInstance().newTransformer().transform((DOMSource)value, xmlOutput);
+ writeObject(xmlOutput.getWriter().toString());
+ } catch (TransformerException | TransformerFactoryConfigurationError e) {
+ throw new IOException("Error writing anyXml", e);
+ }