CSV Adapter
Usage
The CSV Adapter converts inbound CSV messages to XML messages and vice versa.
-
CSV to XML
Use this option to convert CSV messages to a standard XML format and to process it with an XSLT Converter module afterward.
CSV Adapter modules accept CSV data only if it follows the RFC4180 standard. Refer to RFC4180.
-
XML to CSV
To convert data from an XML format to a CSV format. The expected XML input format is a flat XML format containing the individual records to be converted. You can create this XML format using an XSLT Converter module.
Refer to Dialog CSV Adapter
CSV Adapter Example: Converting from XML to CSV
Prerequisites
-
The XML file consist of only two lines, the version declaration, e.g.
<?xml version="1.0" encoding="UTF-8"?>
, and the data section. -
The root element, e.g.
CSV
, must be followed by a one or moreRow
elements. EachRow
element can contain one or moreCell
elements, e.g.:<?xml version="1.0" encoding="UTF-8"?> <CSV> <Row> <Cell>R112233</Cell> <Cell>2005-03-21T16:55:30+01:00</Cell> ... </Row> </CSV>
Proceed as follows
-
Set the start point at the properly configured CSV Adapter.
-
Load an XML file that fits the prerequisites mentioned above.
→ After the workflow has been executed successfully, the output message should look like this:
Dialog CSV Adapter
Base configurations
-
Type
-
CSV to XML
To convert a CSV message to XML format
-
XML to CSV
To convert an XML message to CSV format
CSV settings
-
Character encoding
Choose the desired encoding from the enumeration list, e.g. UTF-8, ISO-8859-1, or CP850.
-
Field delimiter
Choose the character used as filed delimiter in the input CSV message or the one that is to be used in the output message, e.g. semicolon, dot, or colon.
-
Text qualifier
Choose the character used as text qualifier in the input CSV message or the one that is to be used in the output message, e.g. single quote, double quote, or hash.
XML settings (CSV to XML only)
-
Apply column names
If checked, the CSV column names are applied to the XML structure.
-
Trim values
If checked, the white spaces are removed at the beginning and at the end of the field.