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.

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 more Row elements. Each Row element can contain one or more Cell 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>
    module guide 893 1

Proceed as follows

  1. Set the start point at the properly configured CSV Adapter.

  2. Load an XML file that fits the prerequisites mentioned above.

    → After the workflow has been executed successfully, the output message should look like this:

    module guide 894 0

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.