In case you're too lazy to write your own parser, this is a fairly "suckless" ini library: http://ndevilla.free.fr/iniparser/
While XML is pretty horrible on it's own, it is especially horrible for config files in my experience. As long as I don't have to touch it, it works for me, which is obviously not the case for config files. PS: I think the part of the wiki mentioning suckless-related projects and libraries should be updated whenever somebody finds something interesting. I mean this http://suckless.org/other_projects and this http://suckless.org/misc/cool_programs page.