G
Guest
I generated a .cs class from a .xsd schema using the xsd.exe tool from Visual
Studio 2005 and noticed that is generating duplicate class declarations. This
happens because of my schema structure. I have an element, <QuestionList>,
that is a set of <Question> elements that is defined at the root of the
schema and but it can also be defined as child of an element <QuestionGroup>.
The tool, instead of generation a class for the QuestionList element,
generates it twice, one for the root element (class FormQuestion) and a class
FormQuestionQuestionGroupQuestion for <Question> element defined under
<QuestionGroup>.
Here is a portion of a xml instance based on the xsd schema:
<QuestionList>
<Question>
<QuestionGroup>
<QuestionList>
<Question>
....
xsd tool seems to generate classes as a string concatenation of the elements
throughout the schema hierarchy. Any way to avoid this class declaration
duplication?
Thanks
Miguel
Studio 2005 and noticed that is generating duplicate class declarations. This
happens because of my schema structure. I have an element, <QuestionList>,
that is a set of <Question> elements that is defined at the root of the
schema and but it can also be defined as child of an element <QuestionGroup>.
The tool, instead of generation a class for the QuestionList element,
generates it twice, one for the root element (class FormQuestion) and a class
FormQuestionQuestionGroupQuestion for <Question> element defined under
<QuestionGroup>.
Here is a portion of a xml instance based on the xsd schema:
<QuestionList>
<Question>
<QuestionGroup>
<QuestionList>
<Question>
....
xsd tool seems to generate classes as a string concatenation of the elements
throughout the schema hierarchy. Any way to avoid this class declaration
duplication?
Thanks
Miguel