documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw (IOException)new IOException("Cannot instantiate " + Document.class.getName()).initCause(e);
}
Document document = documentBuilder.newDocument();
DomWriter writer = new DomWriter(document);
XStream xstream = XStreamUtil.createXStream();
xstream.marshal(gbeanDatas, writer);
// FileWriter w = new FileWriter("target/foo.xml");