Sound configuration method for a very complex piece of software?


We are writing a C++ program, that needs to be highly configurable (at start time). Right now we have a base XML file, which contains several configuration variables, and filenames of other XML files with more configuration variables. All in all, we have a tree of about 10 XML files, and several binaries file formats with some other content.

We are now at a point where it is getting extremely messy: Since the files are interlinked, it is difficult to find which files are actually parsed and which configuration needs to be edited or which paths to be set.

Are there any better ways to implement a configuration for a complex piece of software except interlinked XML files?

One advantage of this approach that I'd hate to loose, is that it is relatively easy to switch from one part of the configuration to another. For example we have two configuration files for two different Robots, and to switch between which robot we are using we simply link the correct file from the base XML file.

EDIT Some possible ideas might be:

  • Switch to using a database? This would be highly configurable but is not as human-readable.
  • Some structure like firefox's about:config?
  • One huge flat .ini file and just deal with copying stuff around? not an option, this would be even more cumbersome
  • ...

Lua was designed for configuration.