Creating XML files using a given Schmea

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Schema from the folk that shows how they want the data received. I
have my own database that has that data, but in a different way (they use 33
freaking tables to store what I do in 1). Now then, do I:
a) Create a data source that jives with their schema (say, a number of views
or store procedure to represent those 33 tables, but gets it's data from my 1
table) and then create the XML file off of that or...
b) Read their Schema, seek out those elements that are of interest to me,
fill-in the data for these elements as I go and write it all to the XML file
or...
c) Do this in some other basic way that hasn't occurred to me, if so, what?
 
One solution is to generate code from the XML schema file.

The XSD.EXE tool from the .NET SDK can generate typed DataSets or a
set of classes that correspond to the schema. Creating the file can be
as easy as populating a typed DataSet and calling GetXml(). This
approach is not the best fit in all scenarios, so you'll have to give
it a try and see how easy it will be to develop and maintain in your
environment.
 
Back
Top