I am writing a code generation tool that will take in a XSD file generated from Visual Studio's Data Set Generator and create a custom class for each column in each table. I already understand how to implement a IVsSingleFileGenerator
to do the code generation and how to turn that single file generator in to a multi-file generator. However it seems the step I am having the most trouble with is the one that should be the most simple. I have never really worked with XML or XML-Schema before and I have no clue what is the correct way to iterate through a XSD file and read out the column names and types so I can build my code.
Any recommendation on a tutorial on how to read a XSD file? Also any recommendations on how to pull each xs:element
that represents a column out and read its msprop:Generator_UserColumnName
, type
, and msprop:Generator_ColumnPropNameInTable
properties from each element.