public static @NotNull String writeElement(@NotNull Element element, String lineSeparator) {
    StringWriter writer = new StringWriter();
    try {
      createOutputter(lineSeparator).output(element, writer);
    }
    catch (IOException e) {
      throw new UncheckedIOException(e);
    }
    catch (NullPointerException ex) {
      getLogger().error(ex);
      printDiagnostics(element, "");
    }
    return writer.toString();
  }
public static @NotNull String writeElement(@NotNull Element element, String lineSeparator)