code: public Element toElement(CsvDatastore datastore, String filename) {
          final Element datastoreElement = getDocument().createElement("csv-datastore");
          datastoreElement.setAttribute("name", datastore.getName());
  
          final String description = datastore.getDescription();
          if (!StringUtils.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());
  
          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.