code: public String elementAsString(Properties outputProperties) throws TransformerException {
          StringWriter writer = new StringWriter();
          toWriter(false, writer, outputProperties);
          return writer.toString();
      }
docs: Serialize the current XML Element and its descendants 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