code: public static Node normalizeFormatting(final Node doc) throws CouldNotProcessException {
          try {
              return createDocumentFromString(normalizeFormattingAsString(doc));
          } catch (XMLParsingException ex) {
              throw new CouldNotProcessException("Couldn't normalize formatting. Returning old document.", ex);
          }
      }
docs: Creates a pretty formatted version of doc. Note: does not remove line breaks!
  
  @param doc
  @return