Entering the Land of XML and C++ – Xerces-C

cplusplus.jpg

Today I started looking at the XML tools available to me in C++ as I have a project coming up that is going to need to have XML document creation and accessible from C++. There are certainly several libraries to choose from, but after talking to friends about it (at some length) I think the best thing is to use Xerces-C from the Apache Project.

It seems complete, feature-rich, and as with all Apache projects, it's got to have been hammered on for a long time to make sure there are so few bugs it's as good as fool-proof. There was one issue, however, and that was with the documentation.

In the package for Mac OS X (version 2.7.0, 32-bit) the formatting of the DOxygen comments is not very nice. In fact, after looking at the web pages on the Xerces web site and the docs I downloaded, the difference was two little CSS includes:

    <link href="doxygen.css" rel="stylesheet" type="text/css">
    <link href="tabs.css" rel="stylesheet" type="text/css">

I was fixing up the HTML files in the doc/ folder, but then realized there were a ton of them and needed an easier solution. So I did a little digging, and noticed that the one CSS file that was properly imported was XercesApi.css in the same directory. So to that file I simply added the two lines:

    @import url(doxygen.css);
    @import url(tabs.css);

With this, and a few other well-placed <br> entries before the <h1> tags, things are looking much better. Now I can build this on my Mac as well as linux and things should be fine. I really needed the docs online, and this does the trick.