code: public Element toElement(final CsvDatastore datastore, final String filename) {
          final Element datastoreElement = getDocument().createElement("csv-datastore");
          datastoreElement.setAttribute("name", datastore.getName());
  
          final String description = datastore.getDescription();
          if (!Strings.isNullOrEmpty(description)) {
              datastoreElement.setAttribute("description", description);
          }
  
          appendElement(datastoreElement, "filename", filename);
          appendElement(datastoreElement, "quote-char", datastore.getQuoteChar());
          appendElement(datastoreElement, "separator-char", datastore.getSeparatorChar());
          appendElement(datastoreElement, "escape-char", datastore.getEscapeChar());
          appendElement(datastoreElement, "encoding", datastore.getEncoding());
          appendElement(datastoreElement, "fail-on-inconsistencies", datastore.isFailOnInconsistencies());
          appendElement(datastoreElement, "multiline-values", datastore.isMultilineValues());
          appendElement(datastoreElement, "header-line-number", datastore.getHeaderLineNumber());
  
          if (datastore.getCustomColumnNames() != null && datastore.getCustomColumnNames().size() > 0) {
              final Element customColumnNamesElement = getDocument().createElement("custom-column-names");
              datastoreElement.appendChild(customColumnNamesElement);
  
              datastore.getCustomColumnNames()
                      .forEach(columnName -> appendElement(customColumnNamesElement, "column-name", columnName));
          }
  
          return datastoreElement;
      }
docs: Externalizes a {@link CsvDatastore} to a XML element.
  
  @param datastore the datastore to externalize
  @param filename the filename/path to use in the XML element. Since the appropriate path will depend on the
  reading application's environment (supported {@link Resource} types), this specific property of the
  datastore is provided separately.
  @return a XML element representing the datastore.