Tag: csv2xml

  • XML Shell: xmlsh: csv2xml

    A couple of command line options we are using:

    • -delim ‘;’ – German excel files get exported to CSV files with ‘;’ as column separator / delimiter, so when we read such CSV files, we have to take into account this delimiter
    • -header – read 1 row from the csv file and use as column names (element or attribute)
    • -attr – output in attribute normal format (each column is an attribute), default row normal format

    $ csv2xml -delim ‘;’ -header -attr my_file.csv

  • XML Shell: xmlsh

    examples for csv2xml:

    $ csv2xml -header my_file.csv

    $ csv2xml -header -attr my_file.csv

    # for CSV files created by Excel in Germany:

    $ csv2xml -delim ‘;’ -header -attr my_file.csv

    With -header the header line with its column names is being used to name the tags around the specific “cells” in XML.

    If you prefer to use attributes for the column names, use -attr!