建立 Common Language Runtime 型別和 XML 型別與 XML 項目之間的雙向對應。
<configuration> 項目
<system.runtime.remoting> 項目
<application> 項目
<soapInterop> 項目
<interopXmlElement> 項目
<interopXmlElement
clr="FullTypeName, AssemblyName"
xml="xmlElement,xmlNamespace"
/>
屬性和項目
下列小節將說明屬性、子項目和父項目。
屬性
| 屬性 | 說明 |
|---|---|
clr |
必要屬性。 指定您想要建立 XML 項目和 XML 命名空間之對應的完整型別名稱及型別的組件名稱。如果包含組件是在全域組件快取中,這個名稱包含版本、文化特性和公開金鑰資訊。 |
xml |
必要屬性。 指定您想要建立型別和組件之對應的 XML 項目和 XML 命名空間。 |
子項目
無
父項目
| 項目 | 說明 |
|---|---|
application |
定義用來編譯自訂資源檔的組建提供者集合。組建提供者的數量不限。 |
configuration |
Common Language Runtime 和 .NET Framework 應用程式所使用之每個組態檔中的根項目。 |
interopXmlElement |
建立 Common Language Runtime 型別和 XML 型別與 XML 項目之間的雙向對應。 |
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>