String (@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(); }