XML Files
Read one or more XML files, shredding a repeating element into typed rows.
What it does
Reads one or more XML files and shreds a repeating element into rows. Point it at the record element (the tag that marks one row) and pick how to read it: Columns turns each record's child elements and attributes into typed columns, Name / value explodes every leaf into rows, or Extract pulls specific element and attribute paths into named, typed columns. Elements are matched by local name, so namespaced files (payment instructions, regulatory filings, service payloads) need no prefix bookkeeping.
Inputs and outputs
| Inputs | None. This node starts a pipeline. |
| Outputs | One. |
When to use it
- Load a payment-instruction or filing file and flatten it to a table
- Turn a nested product-catalog feed into rows
- Pull a handful of fields out of large, deeply nested XML
Examples
Record element
root/item → one row per <item>
A single name matches that tag anywhere; a path matches its tail.
Child → column
<amount ccy="USD">10</amount> → amount = 10, amount.@ccy = USD
Attributes get an @ prefix.
Repeated elements
two <line> tags → two rows (Explode) or line[0], line[1] (Index)
Chosen under Columns mode.
Every repeat, in Extract
Ustrd[*]
One row per occurrence. A bare Ustrd reads only the first; Ustrd[1] reads the second (counting from 0).
Tips
- Types are inferred from the first 10,000 records, and a code like 00123 stays text, so leading zeros survive.
- XML has no declared schema, so those records decide the columns too. An element that only appears later won't be a column. Set Inference rows to 0 to scan the whole file first.
- The first file that can be read decides the columns. A file whose first record cannot be read (malformed, or not XML at all) is skipped and named, in every mode, and a file holding no record is passed over. Under Stop the run, it stops the run.
- A value that won't fit its column becomes null, and the run's Messages say how many. Malformed XML fails the run and names the file.
- Its columns show in the builder without a run: Columns mode reads them from the first matching file, and Name / value and Extract need no file at all.
- Turn on 'Run each file separately' to process every file as its own run, handy when one bad file shouldn't fail the rest. Every start does this, a schedule and a flow step included. A Test run still reads them together. The runs take turns, one at a time.