code: public void write(Writer out)
              throws XmlModelWriterException, IOException
      {
          try
          {
              DOMSource domSource = new DOMSource(_doc);
              StreamResult streamResult = new StreamResult(out);
              TransformerFactory tf = TransformerFactory.newInstance();
              tf.setAttribute("indent-number", new Integer(INDENT_LEN));
              Transformer serializer = tf.newTransformer();
              if (_publicID != null) {
                  serializer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, _publicID);
              }
              if (_systemID != null) {
                  serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, _systemID);
              }
              serializer.setOutputProperty(OutputKeys.INDENT, "yes");
              serializer.transform(domSource, streamResult);
          }
          catch (TransformerException e)
          {
              throw new XmlModelWriterException(e);
          }
      }
docs: Write the XML to a stream, using standard APIs.  This appears to be about ten times slower than our custom writer
  ({@link #simpleFastWrite}).