Use a schema document as a parameter to the command line. The xsd.exe program, which is part of the visual studio, for creating class files or typed datasets that you can include in your project / solution. These classes or datasets can be serialized in xml and will correspond to the schema document that you used to create them.
The only problem is that it is not dynamic: you cannot wait until the runtime receives the schema files. But nothing is built there that supports it otherwise.
Joel Coehoorn
source share