docs: public void writeXml(T xml, File file, String cdataElements) {
          Marshaller xmlMarshaller = null;
          try {
              xmlMarshaller = this.xmlContext.createMarshaller();
          } catch (JAXBException e) {
              // Without a marshaller we can't write the file
              this.task.log("Unable to create the marshaller so can't write the XML file, exception message: " + e.getMessage(), Project.MSG_ERR);
              throw new BuildException(e);
          }
  
          // Add some nice to have bits to the marshaller
          try {
              xmlMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
              Schema schema = createSchema(this.xmlContext);
              xmlMarshaller.setSchema(schema);
          } catch (PropertyException e) {
              // This means we couldn't pretty print the XML, not the end of the world but log it
              this.task.log("Unable to produce schema for XML due to PropertyException: " + e.getMessage(), Project.MSG_WARN);
          } catch (SAXException e) {
              // This means we couldn't generate the schema so can't validate the XML we produce which is not a fatal error but log this happened
              this.task.log("Unable to produce schema for XML due to SAXException: " + e.getMessage(), Project.MSG_WARN);
          } catch (IOException e) {
              // This means we couldn't generate the schema so can't validate the XML we produce which is not a fatal error but log this happened
              this.task.log("Unable to produce schema for XML due to IOException: " + e.getMessage(), Project.MSG_WARN);
          }
  
          // Now save
          try {
              if (cdataElements != null) {
                  //Wondering what I'm up to here?
                  //JAXB doesn't support CDATA natively, and any simple workarounds are Sun / implementation specific :-(
                  //If we have CDATA elements, me are marshalling the data out via a DOM transform instead....
                  DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                  Document document = docBuilderFactory.newDocumentBuilder().newDocument();
  
                  // Marshall into the document, then we'll put it to file later
                  xmlMarshaller.marshal(xml, document);
  
                  TransformerFactory transformerFactory = TransformerFactory.newInstance();
                  Transformer cdataSpecificNullTransform = transformerFactory.newTransformer();
                  cdataSpecificNullTransform.setOutputProperty(
                                                               OutputKeys.CDATA_SECTION_ELEMENTS, cdataElements);
                  cdataSpecificNullTransform.transform(new DOMSource(document), new StreamResult(file));
              } else {
                  xmlMarshaller.marshal(xml, file);
              }
          } catch (JAXBException e) {
              this.task.log("Unable to create XML due to a JAXBException: " + e.getMessage(), Project.MSG_ERR);
              throw new BuildException(e);
          } catch (ParserConfigurationException e) {
              this.task.log("Unable to transform CDATA fields in XML due to a ParserConfigurationException: " + e.getMessage(), Project.MSG_ERR);
              throw new BuildException(e);
          } catch (TransformerConfigurationException e) {
              this.task.log("Unable to transform CDATA fields in XML due to a TransformerConfigurationException: " + e.getMessage(), Project.MSG_ERR);
              throw new BuildException(e);
          } catch (TransformerException e) {
              this.task.log("Unable to transform CDATA fields in XML due to a TransformerException: " + e.getMessage(), Project.MSG_ERR);
              throw new BuildException(e);
          }
      }