Press "Enter" to skip to content

XML to CSV

XML to CSV is application which allows you to copy-paste XML text or upload a XML file and convert its content into CSV file.

You can use here whatever XML syntax you want – even complex nested objects and arrays with values, and XML TO CSV app will consume it, and give you nice and clean CSV file to download.

XML data format is widely used in software development and in many other jobs where users are working on data, especially, when in usage are more then one application. In many cases it is needed to export data from one system in one format like XML, next import it another system, where maybe, you need to store it in CSV files.

It is not easy to map XML into CSV file. Main problem is that XML can contains nested and inconsistent data. In one object you can have numbers or strings stored directly under some properties and in the same XML file you can have arrays of objects or objects containing another arrays. Sounds probably very complicated, but this is the reality and power of storing data in XML format. So it is not possible to make some basic and easy algorithm to map values from nested XML structure, into flat table structure of CSV files.

That’s the reason why we created this application. Behind it we implemented sophisticated algorithms which are identifying data types inside XML, then it is choosing what is the best way of flattening arrays and objects and transform it into nice looking CSV file.

Application is created in a way to consume all kinds of XMLs, even with nested objects, but you must remember that this is very hard to transform and present nested objects from XML into flat table in CSV file. We suggest to use following data syntax in your XML files for successful CSV transformation:

  1. Keep consistency of data inside XML. Our algorithms will handle it, but data inside CSV can be in not nice-looking form. Most preferable forms are:
    a) Array of objects or array of arrays
    b) Array of numbers/strings
    c) Object containing arrays or objects under its properties
    .
  2. Do not mix data types inside one data structure. Our algorithms will handle that, but data inside CSV can be in not nice-looking form. Keep the following rules in your XML files:
    a) Under one array keep the same types of data like only: objects, arrays or numbers/strings
    b) Do not mix data under one array or object, example: arrays/objects among numbers/strings
    .
  3. Avoid too nested data in you XML. If you have on 3rd or higher nest in your XML next nested data especially like objects or arrays of objects, it means that in this place this data should be handled into another table (sheet) combined with index/key relation between both tables/sheets. This functionality is not implemented yet in our algorithm, so currently in this place you will get stringified object or array.
    .

Enjoy using our app 🙂