创建公共语言运行库类型与 XML 类型及 XML 命名空间之间的双向映射。在用 SOAP 中的 xsi:type 属性指定类型时,使用此元素。
<configuration>
<system.runtime.remoting> 元素
<application> 元素
<soapInterop> 元素
<interopXmlType> 元素
<interopXmlType  
   clr="FullTypeName, AssemblyName"  
   xml="XmlType, XmlNamespace" 
/>
属性和元素
以下几节介绍属性、子元素和父元素。
属性
| 属性 | 说明 | 
|---|---|
| clr | 必选的属性。 指定要为其创建到 XML 类型及 XML 命名空间的映射的类型的完整类型名和程序集名。如果包含程序集位于全局程序集缓存中,则此信息包括版本、区域性和公钥信息。 | 
| xml | 必选的属性。 指定要为其创建到类型和程序集的映射的 XML 类型名及 XML 类型命名空间。 | 
子元素
无。
父元素
| 元素 | 说明 | 
|---|---|
| application | 包含有关应用程序使用和公开的远程对象的信息。 | 
| configuration | 公共语言运行库和 .NET Framework 应用程序所使用的每个配置文件中的根元素。 | 
| soapInterop | 包含与 SOAP 一起使用的类型映射。 | 
| system.runtime.remoting | 包含有关远程对象和信道的信息。 | 
示例
下面的示例将元素 ElementName 及 XML 命名空间 Example:mynamespace 与 AssemblyName 程序集所实现的 .NET 类型 TypeName 关联在一起。对于 XML 类型和命名空间也是如此。
<configuration>
   <system.runtime.remoting>
      <application name="soapInterop">
         <soapInterop>
            <interopXmlElement 
               xml="ElementName,Example:mynamespace"
                clr="TypeName,AssemblyName"
            />
            <interopXmlType  
               xml="XmlTypeName,Example:TypeNamespace" 
               clr="TypeName,AssemblyName"
            />
         </soapInterop>
      </application>
   </system.runtime.remoting>
</configuration>
请参见
参考
.gif)
版权所有 (C) 2007 Microsoft Corporation。保留所有权利。