Hey everyone,
I'm currently writing software for a project that uses a lot of Xml files
for configuration. The project is written in C#/.NET. Each such xml file has
a schema defined for it (Xsd file). This schema is not used at run-time. What
we do is use XPath expressions to query for required information (nodes).
We are currently still in development, but we have a few deployments to test
the software. These deployments each have their own configuration (eg for
coordinates).
The problem comes when an upgrade of the software is distributed. Upgrading
the binaries (software) is trivial: just copy. However upgrading the
configuration (xml-)files automatically is another story. The information
that is in the configuration files should stay the same. New information
should be inserted in the configuration files, preferably automatically.
Information that is no longer needed should be retained (this to facilitate a
downgrade of the software, for which I do not intend to write software).
Information elements that did not exist in an earlier version, is queried for
at the time of upgrade or has a default, and should then be inserted.
I would like to know what other people (would) do in this situation. Are
there any tools to facilitate this sort of upgrades? Any .NET libraries that
could help?
With kind regards,
PS: Sorry if this post is a little off-topic.
--
Tom Tempelaere.