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

Union Element Binding Support 

The .NET Framework does not provide binding support for the <union> element.

When Xsd.exe encounters a simple type defined by union, it ignores the <simpleType> definition and uses the built-in string data type in its place.

The XML Schema definition language allows a simple type to be defined as a union of one or more simple types, or member types. An instance of the type may validly conform to any one of the member types.

When the Xsd.exe utility encounters a simple type defined by union, it ignores the <simpleType> definition and uses the built-in string data type in its place. Accordingly, when deserializing an XML document into a type generated by Xsd.exe, the XmlSerializer class disregards an Xsi:type Attribute Binding Support attribute intended to instantiate a union, deserializing instead a string.

Possible Attributes Binding Support

id

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

memberTypes

Xsd.exe ignores the memberTypes value along with the rest of the containing <union> element. Instead, the tool produces a string in place of the simple type definition.

Possible parent elements: <simpleType>

Possible child elements: <annotation>, <simpleType>

Community Additions

ADD
Show:
© 2015 Microsoft