I'm working with a data import process in C#, which takes a zip file filled with XML files and saves specific data points into a database. This is accomplished by loading the XML data into classes compiled from the schema. The import logic retrieves the data by digging down into the right classes and fields.
The XML schema is defined by a different company, and the schema changes every one to years when an updated version of their software is released. What my company would like to do is be able to import different versions of the schema so that we could support older files. There is also debate on whether this change is worth the effort.
My plan to accomplish this would be to determine which schema to use at the beginning of an import, and then use different interfacing classes to get the data from the XML and pass it back to the import classes, which would then save the values to the database. There are over 200 classes generated based on the schema, but we only need to access data in about half of them.
Are there other ways to approach supporting multiple XML schemas that may be easier?