public void serialiseDocument(OutputStream out, Document graph, boolean format)
     throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.setProperty("jaxb.formatted.output", format);
   configurePrefixes(m, graph.getNss());
   m.marshal(of.createDocument(graph), out);
 }
 public String serialiseDocument(StringWriter sw, Document graph, boolean format)
     throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.setProperty("jaxb.formatted.output", format);
   configurePrefixes(m, graph.getNss());
   m.marshal(of.createDocument(graph), sw);
   return sw.toString();
 }
 public String serialiseDocument(StringWriter sw, Document graph) throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.marshal(of.createDocument(graph), sw);
   return sw.toString();
 }
 public Node serialiseDocument(Node addTo, Document graph) throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.marshal(of.createDocument(graph), addTo);
   return addTo;
 }