public static void write(@NotNull Element element, @NotNull Path file, @NotNull String lineSeparator) throws IOException {
    Path parent = file.getParent();
    if (parent != null) {
      NioFiles.createDirectories(parent);
    }

    try (BufferedWriter writer = Files.newBufferedWriter(file)) {
      createOutputter(lineSeparator).output(element, writer);
    }
  }
public static void write(@NotNull Element element, @NotNull Path file, @NotNull String lineSeparator)