DataTable from XML Schema ?

kantplayalik

Member
Joined
Mar 17, 2006
Messages
7
Programming Experience
1-3
I was wondering is there a way to create a datatable based on the criteria defined in a XML Schema File (XSD)? I have to grab data from a MS Access table, then convert it into XML Data and validate it against a pre-defined XSD Schema. The Schema is quite large, and it would be very time consuming to create the table by hand. I'm using VB.NET 2003 and MS Access. Any ideas would be much appreciated. Some sample code would be even better. Thanks In Advance. :)
 
Thanks for the reply :). I think I should have been more specific in my post earlier, sorry about that. Any way, here is my situation.

I have and existing XSD Schema, and what I would like to do is create a dataTable to hold data with the constraints defined by the XSD file. I will need to validate data against this Schema, however the XML data has not been created yet, hence the need for the table. Is it possible to define an empty dataTable programatically and incorporate the constraints set forth in the existing XSD Schema, and if so, to then create a "valid" XML document from the data residing in the newly created table (after filling the table with the data that is needed of course)? Maybe something like :

Dim ds as new Dataset()
ds.Tables(0)= newly created dataTable
Dim xDoc as new XMLDocument
xDoc = ds.writeXML()

Is something like this even possible, or am I way off base here? Thanks in Advance.
 
Back
Top