code: public static String convertDocumentToFormattedString(final Document doc, final XMLFormatProperties xmlFormatProperties,
              final boolean includeElementName) {
          return XMLUtilities.convertNodeToString(doc, includeElementName, xmlFormatProperties.getVerbatimElements(),
                  xmlFormatProperties.getInlineElements(), xmlFormatProperties.getContentsInlineElements(), 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.