code: public static String convertDocumentToFormattedString(final Document doc, final XMLFormatProperties xmlFormatProperties) {
          return convertDocumentToFormattedString(doc, xmlFormatProperties, true);
      }
docs: Convert a DOM Document to a Formatted String representation.
  
  @param doc                 The DOM Document to be converted and formatted.
  @param xmlFormatProperties The XML Formatting Properties.
  @return The converted XML String representation.