I am trying to generate C# classes from the following XSD file.
I run xsd.exe with the options to generate C# classes. Ideally I would like to create an ORM from the XSD (and thus generate the DDL from the schema file), but I am not sure if XSD.exe is the way to go forward.
In any event, this is what I want to do (in decreasing order of urgency)
- Create classes from the XSD file
- Provide CRUD functionality (active record pattern) via an (autogenerated?) ORM
- Autogenerate DDL from the XSD and populate the db with the permitted values specified in the XSD.
For the last one, I suspect that I may have to hack something together using XSLT.
Starting with the first problem, I run xsd.exe like this:
xsd mddl.xsd /c /eld /o: c:\some\folder
The output from running the above command is:
- Group 'mathNode.model' from targetNamespace='http://www.mddl.org/mddl/3.0-beta' has invalid definition: Circular group reference.
Now I am new to XML/XSD etc - so I am currently stuck on how to resolve this. Can someone spot why the Circular reference is being caused - and more importantly, how to fix it?