How To Convert a File of Comma Separated Values (CSV) to an XML File?
- Load CSV data click the Open CSV File button to select the CSV file from your local file system. After you have done so, your CSV data will be displayed in a data grid with default document, row and field names.
- click the Convert button to convert the CSV data to XML. After you have done so, the converted XML data will be displayed.
How To Change the Default Document, Row and Field Names?
You can supply your own values for the document, row and field names. Just click the value you want to change and type in your value to replace the default value. Our Converter will validate the value you supplied. If the value is not valid for an XML element, we will give you an error message.
Convert Fields
You can choose one of the following three options to convert a field of CSV to XML value.
- Element This is the default. When this option is checked, the CSV will be converted to a child emelemt of the row element. For example:
value
- Attribute When this option is checked, the CSV will be converted to an attribute of the row element. For example:
- Skip When this option is checked, the CSV of this field will be not be converted. This option is useful if your CSV file contains some fields that you do not want in your XML file.
Options
Date Format Conversion The standard XML Date element has the following format "YYYY-MM-DD" where:
- YYYY indicates the year
- MM indicates the month
- DD indicates the day.
If your file contains date data in other format your converted XML file will not pass the validation. You can click the
Options command button to specify a desired date format conversion. You need to specify the element name for the field that contains the date data.