Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SimpleType Element Binding Support

SimpleType Element Binding Support 

The .NET Framework provides partial binding support for the <simpleType> element.

The only simple types that bind to code without loss are lists applied to XML attributes and enumerations restricting string-based types.

The .NET Framework provides fully expressive bindings for simple types defined as lists only when the types are used for XML attributes, as opposed to XML elements. See the List Element Binding Support element.

For simple types defined through restriction, bindings are produced only for the enumeration of string-based simple types. See the Restriction Element Binding Support element.

The Xsd.exe tool ignores simple types defined through union, via the Union Element Binding Support element.

Possible Attributes Binding Support


The final attribute can be applied to a data type to prevent it from being derived.

Xsd.exe ignores the final attribute, as well as the finalDefault attribute of the <schema> element.


The Xsd.exe utility ignores the id attribute, which is intended to provide a unique identifier. Instead, Xsd.exe recognizes the name attribute.


The value of the name attribute becomes the name of the .NET Framework type that Xsd.exe generates from the simple type.

No attempt is made to change case to adhere to coding conventions. For example, if the name attribute of a <simpleType> element has the value testInfo, the ensuing class gets named testInfo, rather than the capitalized TestInfo. If a name conflicts with a reserved keyword, the resulting name is prepended with the symbol @.

When Xsd.exe generates a <simpleType> definition from a class, it uses the class name for the value of the name attribute. An alternate name—name attribute value—can be supplied via the TypeName property.

See the Name Attribute Binding Support attribute.

Possible parent elements: <attribute>, <element>, <list>, <redefine>, <restriction>, <schema>, <union>

Possible child elements: <annotation>, <list>, <restriction>, <union>

Community Additions

© 2015 Microsoft