Friday, April 06, 2007

XMHell

There we were happily using CSV files and now the world and his brother (and apparently his sister, cousins and even the fat bloke down the pub) want to use XML.

I'm sure XML has some uses but for the traditional Import and Export of ordinary data records it's just a pain in the proverbial. To be fair writing out XML is pretty easy (after you have wasted a few days learning something else you didn't want to know) but importing is just a pointless exercise in using the latest technology just because it's fashionable.

The customers application is going to send us an xml file, which we then have to parse to get it into CSV format so we can import it. Why? It's just as easy (probably easier) for the app to write out a csv file in the first place. So we have a whole layer of unnecessary code that serves no useful purpose and in fact can be a problem with very large import files due to memory usage.

Plus we have to go through all the pain of working out which version of Microsoft XML is available on all Windows platforms otherwise we have additional aggravation in getting the necessary msi installed on our users machines. (To save you the trouble, use MSXML 3.0 - this is allegedly available on all Windows OS as standard)

The way forward appears to be to use XSL files to convert the XML to CSV. I'll report back after I've fallen down all the gotchas. Or I may just go to the pub and have a pint of bitter version 1.0. Unless that Fat Bloke's there of course.

No comments: