<add> Element for <schemaImporterExtensions>
Adds types used by the XmlSchemaImporter for mapping XSD types to .NET types. For more information about configuration files, see Configuration File Schema.
<configuration>
<system.xml.serialization>
<schemaImporterExtensions>
<add>
Syntax
<add name = "typeName" type="fully qualified type [,Version=version number] [,Culture=culture] [,PublicKeyToken= token]"/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
name | A simple name that is used to find the instance. |
type | Required. Specifies the schema extension class to add. The type attribute value must be on one line, and include the fully qualified type name. When the assembly is placed in the Global Assembly Cache (GAC), it must also include the version, culture, and public key token of the signed assembly. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
<schemaImporterExtensions> | Contains the types that are used by the XmlSchemaImporter. |
Example
The following code example adds an extension type that the XmlSchemaImporter can use when mapping types.
<configuration>
<system.xml.serialization>
<schemaImporterExtensions>
<add name="contoso" type="System.Web.Mobile.MobileCapabilities,
System.Web.Mobile, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</schemaImporterExtensions>
</system.xml.serialization>
</configuration>
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.