 IonToXml
IonToXml
Convert an ION file into XML.
yaml
type: "io.kestra.plugin.serdes.xml.IonToXml"Examples
Read a CSV file, transform it and store the transformed data as an XML file.
yaml
id: ion_to_xml
namespace: company.team
tasks:
  - id: download_csv
    type: io.kestra.plugin.core.http.Download
    description: salaries of data professionals from 2020 to 2023 (source ai-jobs.net)
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/salaries.csv
  - id: avg_salary_by_job_title
    type: io.kestra.plugin.jdbc.duckdb.Query
    inputFiles:
      data.csv: "{{ outputs.download_csv.uri }}"
    sql: |
      SELECT
        job_title,
        ROUND(AVG(salary),2) AS avg_salary
      FROM read_csv_auto('{{ workingDir }}/data.csv', header=True)
      GROUP BY job_title
      HAVING COUNT(job_title) > 10
      ORDER BY avg_salary DESC;
    store: true
  - id: result
    type: io.kestra.plugin.serdes.xml.IonToXml
    from: "{{ outputs.avg_salary_by_job_title.uri }}"
Properties
from *Requiredstring
Source file URI
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
charset string
 Default 
UTF-8The name of a supported charset
Default value is UTF-8.
rootName string
 Default 
itemsXml root name
timeZoneId string
 Default 
Etc/UTCTimezone to use when no timezone can be parsed on the source.
Outputs
uri string
 Format 
uriURI of a temporary result file
