Serialization XmlToIon

Serialization XmlToIon

Certified

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.

yaml
type: io.kestra.plugin.serdes.xml.XmlToIon

Convert an XML file to the Amazon ION format.

yaml
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

Source file URI

DefaultUTF-8

The name of a supported charset

Default value is UTF-8.

Definitions
forceListarray
SubTypestring

List of XML tags that must be parsed as lists

Reference (ref) of the pluginDefaults to apply to this task.

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.

Default0

The number of records converted

Formaturi

URI of a temporary result file

Number of records converted