PathPath to the file, can be a variable.
Example 1: ../test.csv
Example 2: %filePath%
Example 3: C:/testFolder
The component also supports reading out files from a cloud storage.
Example 4: <cloud-storage>://testFolder/test.csv
EncodingOne of the following encodings can be chosen:
Parsing
Parse CSV
Parses CSV, separating using the delimiter
.
DelimiterThe symbol that will separate columns.
Example:
With delimiter semicolon
Input row: first,name;last name
Output: ['first,name', 'last name']
Text qualifierThe character to use to quote fields that contain a delimiter.
Input row: "first,name",last name
Output: ["first,name", "last name"]
Treat first row as a headerTransforms the rows into objects where the keys are the headers (first row)
Example:
{
"first name": "Jason",
"last name": "Dick"
}
Parse XML
Parses XML. The following configuration can be applied to the parser. By default, attributes and comments are not parsed.
Allow Boolean AttributesAllows attributes without value. By default, boolean attributes are ignored. When set to true
:
<hello checked>
world
</hello>
will be parsed to:
{
hello: {
"@_checked": true,
"#text": "world"
}
}
Always Create Text NodeForce rendering a tag with a text node. Otherwise, it creates a property with the tag name and assigns the value directly.
Example:
With alwaysCreateTextNode
set to false
:
With alwaysCreateTextNode
set to true
:
{
hello: {
"#text": "world"
}
}
Parse CommentsComments are parsed with prop name @_comments
.
Example:
<hello>
<!--world-->
</hello>
Will parse to:
{
hello: {
"@_comments": "world"
}
}
Ignore AttributesAttributes are ignored by the parser. By default set to true. This also means that any configuration regarding attributes will not apply.
Parse Attribute ValueForce parsing the attribute value. This is relevant when attribute values have another type than string.
Example:
<hello attr="true">
world
</hello>
With parseAttributeValue
set to false
:
{
hello: {
"@_attr": "true"
}
}
With parseAttributeValue
set to true
:
{
hello: {
"@_attr": true
}
}
Parse Tag ValueForce parsing the tag value. Same logic applies as with parseAttributeValue
.
Preserve OrderUsed to keep the order of tags in the result object.
Remove NS PrefixRemove namespace string from tag and attribute names.
Example:
<ns:hello ns:attr="true">
world
</ns:hello>
Will parse to:
{
"hello": {
"@_attr": "true"
}
}
Unpaired TagsUnpaired Tags are the tags which don't have matching closing tag. Eg <br>
in HTML. You can parse unpaired tags by setting the unpaired tags separated by a comma (,).
Example:
<hello>
world
<br>
</hello>
With unpairedTags
set to br
will parse to:
{
hello: {
"#text": "world",
unpaired: ""
}
}
Parse JSON
Parses the file as a JSON and outputs an object.