Their system only accepts XML

DataFileConverter » Use cases » CSV and XML integration

Download DataFileConverter Free Trial »     Buy DataFileConverter Now »

The situation

Two systems have to exchange data and they do not agree on a format. A partner, an ERP or a government portal wants XML; the file you have is CSV or Excel. Or the opposite: the system exports XML and the person who has to read it wants a spreadsheet.

It is rarely a one-off, either - the same exchange happens every month, and each time somebody converts the file by hand or writes the same throwaway script again.

What you do

  1. CSV/Excel to XML: choose the source file, set XML as the destination, preview the mapping, and convert. Column names become elements, and the structure of the output follows the mapping you see in the preview.
  2. XML to CSV/Excel: choose the XML file, pick CSV or Excel, and convert. Nested elements and attributes are flattened into columns, which is what makes the result readable in a spreadsheet.
  3. Save the conversion as a session if the same exchange happens every month.

Converting a CSV file to XML with DataFileConverter

Both directions are supported, so the same tool answers the question in either direction. Files are converted locally - the data does not have to be sent to a converter website, which matters when the file belongs to a partner or a customer.

What it will not do

When the shapes do not match

If the element names or the column order differ from what the other side expects, that is a mapping question rather than a conversion question - the preview is there to check it before you convert. For structured data heading into a database instead of a file, see FileToDB.

Related

Converting in the browser: CSV to XML, XML to CSV. Guides: CSV to XML, XML to CSV. Other directions: XML to JSON, CSV to JSON.