CSV to XML

CSV to XML

One of the valid input formats of InterFormNG2 is CSV files. If you e.g. want to data in an input CSV file in either an email or in a template, then you first need to convert the CSV file into XML. You can use the basic, converter workflow component, CSV to XML for that.

 

In order to select this component the payload must be CSV e.g. by selecting CSV as the input file type in the workflow.

 

The component has these input parameters:

 

NG2CSV2XML0001

 

Delimiter

The character used as identification of start/end of each field in the input CSV file. Only a single character is supported.

 

Character encoding

The encoding of the input CSV file. The output XML file is generated with UTF-8 encoding. Character encoding is the Java identifier for the encoding of the source CSV. If not specified, it default to UTF-8. See this link for a list of valid character encoding names: https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html

 

With the settings above and this as contents in the input csv file:

 

Name;Street;Address;Country

Santa Clause ;The Windystreet 7 ;The Cold City ;Greenland

 

Then the output XML file will look like this:

 

NG2CSV2XML0002

 

As you can see the fields are output in nodes named "col" followed by a number and the lines in the output XML file are named "row".

 

You can verify the output of the conversion e.g. with the To filesystem component:

 

NG2CSV2XML0003

 

You can also use the converted XML file as input for a merge with a template into e.g. printemail or PDF or transform the XML file before merging it.

    Notice: Help Center Transition Update

    As of January 13, 2025, we are excited to announce that our new Help Center is in the final stages of development. While the Knowledge Base is already accessible, our current JIRA system will continue to manage support tickets during this transition period. For assistance with InterForm Output Management Software, please refer to the Support for InterForm Output Management Software.

    We appreciate your patience and understanding as we work to enhance your support experience. If you have any questions or encounter any issues, please do not hesitate to reach out via the existing support channels.

    Best regards,
    The InterForm Support Team


      • Related Articles

      • CSV

        File types of the type CSV (Comma Separated Values) is one of the file types/payloads, that can be processed in the InterFormNG2 workflow. The csv files normally the file extension .csv. If you want to process CSV input files in InterFormNG2, then ...
      • CSV file into Excel

        InterFormNG2 is able to convert generic CSV files into Excel. In this section I will describe how that can be done. As an example we consider a CSV file with this content: Seq,Product No,Description 1,4234,aaaaa 2,23423,bbbbbb 3,3423,ccccccc ...
      • XML

        XML is used widely in InterFormNG2 as both input and output payload in the workflow (and of course in the designer). Please notice, that some workflow components are listed as accepting only XML as input, where they actually also accept an IBM i ...
      • Split XML

        This advanced converter workflow component can split up an XML in the payload of the current workflow. The subtree of this workflow component is executed for each splitted XML. A similar component, which is also able to transform the splitted files, ...
      • XML remove namespaces

        This advanced utilities workflow component removes all name spaces from the XML file in the workflow payload. The workflow continues processing on the changed XML. The XML remove namespaces workflow component has no parameters.