xsd.exe tool generates classes for given xsd file. It follows a pattern for naming the type. For example,
<Students>
<Student Name="A" RollNo="1" Address="Some Address">
<Department Id="20" Name="CSE"/>
</Student>
</Students>
xsd.exe /c Students.xsd
Students.cs file is generated. If we see the type for elements
Element Type Name
Students Students
Student StudentsStudent
Department StudentsStudentDepartment
It generates type by prefixing the parent element name if the element is child. Can we control this name? I need the type name as same as element name. Student => Student, Department => Department
Thanks in Advance
In general, one cannot customize the names of the generated classes when using xsd.exe - unlike mechanisms available elsewhere, for e.g. a JAXB user through custom JAXB binding file.
However, for xsd.exe the generated class names depend on the authoring style. What you described, is generated when the authoring style is conformant to the "Russian Doll" i.e. as below:
If you change its style to something different (this is called a Venetian Blind):
You'll be getting these classes generated: