
Serialization XmlToIon
CertifiedConvert an XML file to the Amazon ION format
Serialization XmlToIon
Convert an XML file to the Amazon ION format
Without a query, the entire file is parsed into a single ION record. When query is set (e.g., /catalog/book), uses StAX streaming to extract each matching element as a separate ION record — suitable for large files. External entity resolution is disabled for security.
type: io.kestra.plugin.serdes.xml.XmlToIonExamples
Convert an XML file to the Amazon ION format.
id: xml_to_ion
namespace: company.team
tasks:
- id: http_download
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/xml/products.xml
- id: to_ion
type: io.kestra.plugin.serdes.xml.XmlToIon
from: "{{ outputs.http_download.uri }}"
Properties
from *Requiredstring
Source file URI
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
charset string
UTF-8The name of a supported charset
Default value is UTF-8.
parserConfiguration Non-dynamic
XML parser configuration
List of XML tags that must be parsed as lists
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
query string
Path selector to stream matching elements from the XML file
When set, uses StAX streaming to extract elements matching the given path
(e.g. /catalog/book). Each matching element is written as a separate ION record.
When not set, the entire XML file is parsed into a single ION record.
Outputs
size integer
0The number of records converted
uri string
uriURI of a temporary result file
Metrics
records counter
Number of records converted