First of all, I should mention that I'm not new to programming. I have seen a lot of hairy stuff. I have been using C++ for almost 15 years now. I am experienced in lots of related semi-obscure technologies such as COM, DCOM, CORBA, ODBC...
... But as over-engineeered as all of the above technologies are, I have found that they have absolutely nothing on xerces.
It all started with a hobby project, where I needed to read and write XML files. I started looking around for something that would fit my requirements of:
- Fast loading of files from disk
- Validation against a schema during load
- Writing of XML files to disk
- Cross-platform
The only one that seemed to fit the bill was xerces. So, I download a copy, and the first thing I notice, is that the compiled, optimized xerces DLL is a full 2.41 MB. Ok, it's not gigantic, but it seemed pretty hefty for something that is basically just manipulating text files.
Soon enough, I started seeing why. Reading of files with the SAX parser turned out to be multiple inheritance galore. And the strings...they have rolled their own string class too. After pulling hairs for a long time, I managed to finally get it to read my XML files, but not thanks to their documentation, which is utter gibberish and assumes you have a PhD in xerces already.
Just before I started writing this [s]post[/s] rant, i spent a few hours trying figure out how to to get xerces to write an XML file. I finally gave up, when I realized it would involve all the junk seen here: http://stackoverflow...nd-c-on-windows
And that's just for saving the file, the DOM tree that contains the actual data needs to be generated separately.
Realizing it would gain me nothing to use xerces to write the file also (it doesn't perform validation, etc. when saving) I just gave up and started writing an implementation that writes it directly to a C++ stream object instead.
My final words about this topic is: Screw you xerces, I hate you. And I hate your documentation even more.