public String exportAsXml(final GanttChart ganttChart, final boolean prettyFormat)
{
final Document document = DocumentHelper.createDocument();
final XmlObjectWriter writer = getXmlGanttObjectWriter();
final XmlRegistry xmlRegistry = new XmlRegistry();
xmlRegistry.registerConverter(Date.class, new ISODateConverter());
writer.setXmlRegistry(xmlRegistry);
final MyRootElement root = new MyRootElement();
root.ganttChart = ganttChart;
root.setCreated().setTimeZone(PFUserContext.getTimeZone()).setVersion("1.0");
final Element element = writer.write(document, root);