code: public String asString(Properties outputProperties) throws TransformerException {
          StringWriter writer = new StringWriter();
          toWriter(writer, outputProperties);
          return writer.toString();
      }
docs: Serialize the XML document to a string by delegating to the
  {@link #toWriter(Writer, Properties)} method. If output options are
  provided, these options are provided to the {@link Transformer}
  serializer.
  
  @param outputProperties
  settings for the {@link Transformer} serializer. This parameter may be
  null or an empty Properties object, in which case the default output
  properties will be applied.
  
  @return
  the XML document as a string
  
  @throws TransformerException