When and Why is XML preferable to CSV?

csv, data-formats, xml

Solution

Some strengths:

- You can validate XML data against XSD

- You can easily provide contracts (as XSD) to other parties that should either create/consume XML data, without literally describing them

- You can have one to many relations in multi-levels in XML data representation

- XML is arguably more readable than CSV

- XML is natively supported by the .net framework

To name a few from the top of my head.

Problem

sometimes it feels like XML has been used just because it was fashionable.

Original source