Converts a flat file containing multiple row type (denoted by row headers) into an hierarchical XML document or the reverse.
188.8.131.52 Initial Release
184.108.40.206 Fixed a parse offset issue
Type: List Input
Parse - Parses the document in
FlatFileDocument and converts it into an XML document
Create - Parses the document in
XmlDocument and converts it to a flat file document
Indicates the action that should be performed
Type: Multiline Text InputOutput
The headered flat file document, see Remarks for further details.
Type: Multiline Text Input
The configuration that defines how to parse or generate the flat file. Click
Change/View to launch the editor for this Property.
Type: Xml InputOutput
The XML document, see remarks for further details.
Use this Node to convert between a multi-record flat file and an XML document. Each row in the multi-record flat file document should begin with a unique header that signals the type of row. The fields that follow the row header are then dependent on the row type. Note that when a multi-record flat file is being parsed, the characters that compose the row header are not included as part of the first field. For example, in a document that contains a row starting with
A indicates the row type, if a first field of 3 characters is specified, the returned value for the field will be
100 and not
This type of flat file is common in EDI where there are typically row types for document header/footer, order header/footer and detail line amongst others.
Configuration property is used to describe how to parse or generate the flat file.
- Fixed Width - indicates whether the file should be treated as fixed width or delimited. In fixed width mode, column widths are specified for all columns and no
Column Delimiteris specified. In delimited mode, column widths are not specified and
Column Delimitermust be specified
- Row Delimiter - provides the character sequence that is used to delimit rows. By default this is
\r\n(i.e. carriage return followed by line feed).
- Column Delimiter - provides the character that is used to delimit columns when
Fixed Widthis turned off.
- Encapsulator - provides a character that is used to encapsulate field values (typically
"). Leave this field empty if the fields are not encapsulated
Encapsulator properties allow the following escaped characters to be provided:
- \\ Backslash
- \0 ASCII character 0
- \a Alert
- \b Backspace
- \f Form feed
- \n New line. Line break in Linux. In Windows, a line break is typically \r\n
- \r Carriage return. In Windows, a line break is typically \r\n
- \v Vertical tab
See https://flowgear.me/s/dxQxEX0 for an example.