XML versus CSV

by Codewiz51 5. May 2010 21:03

A lot of my after hours time is spent improving my XML DOM object skills.

However, when I looked over my projects at work, I realized CSV file formats are probably more important than XML.  Why?  Because engineers like to use Excel.  It seems to be the most important adhoc analysis tool used in our industry.  Long before our statistical analysis tools are unleashed, rough calculations are derived in Excel.  And what is the file exchange medium of choice for importing data into Excel?  Comma-Separated-Value files.

CSV files are so important to my work that I have multiple well debugged CSV parsing libraries for native and managed applications.  All of my applications export data to XML, MDB and CSV and import data from XML and CSV files.  However, I doubt the feature to import and export to XML files have ever been used.  I've been trying to get the engineers to use Access when analyzing very large datasets.  I've given brown bags on using Access for data analysis, so I know the MDB file export works properly.  However, I tend to think my users only use CSV.  I've noticed on software requirement specifications that data export (and import) to CSV file format is always near the top of the list.  MDB file formats are usually never listed, and XML only seems to be important if an IT geek gets involved.

I've also noticed when I have to move large amounts of data across the internet, I tend to use CSV files 90% of the time.  It's just hard to beat the simplicity of the file format.  With careful filtering of double quotation marks, one rarely runs into issues.  I've also noticed that an article I wrote on how to write a Unicode CSV file in C++ for Excel to import is still one of the most heavily accessed articles: Writing Unicode CSV for Excel Input.

So, XML may get all the hype, but in my world, CSV is the workhorse of choice.

Tags: , ,


Comments are closed


This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cat or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.  So, take most of what I say with a grain of salt.

© Copyright 2008-2014