A Flatfile plugin for parsing XML files, flattening nested structures and attributes, and converting them into tabular format for easy import into Flatfile Sheets.
Parameter | Type | Default | Description |
---|---|---|---|
separator | string | "/" | Character used to separate keys when flattening nested XML elements |
attributePrefix | string | "#" | Prefix added to keys derived from XML element attributes |
transform | function | undefined | Function to transform each parsed data row before passing to Flatfile |
chunkSize | number | 10000 | Number of records to process in each batch |
parallel | number | 1 | Number of chunks to process concurrently |
debug | boolean | false | Enable verbose logging for debugging |
"/"
as a separator (e.g., <country><name>USA</name></country>
becomes "country/name"
)"#"
(e.g., <country code="US">
becomes "country#code"
)separator
and attributePrefix
configuration. The default flattening behavior might not match your desired output format.
<email>
tags), the extractor creates indexed headers. The first email tag becomes the email
field, the second becomes email/0
, the third email/1
, and so on.
transform
function to inspect intermediate parsed output: