XmlSchema.Compile 方法

定義

將 XML 結構描述物件模型 (SOM) 編譯成驗證用的結構描述資訊。 用於檢查以程式方式建置的 SOM 的語法和語意結構。 語意驗證檢查是在編譯階段執行。

多載

Compile(ValidationEventHandler)
已淘汰.
已淘汰.
已淘汰.

將 XML 結構描述物件模型 (SOM) 編譯成驗證用的結構描述資訊。 用於檢查以程式方式建置的 SOM 的語法和語意結構。 語意驗證檢查是在編譯階段執行。

Compile(ValidationEventHandler, XmlResolver)
已淘汰.
已淘汰.
已淘汰.

將 XML 結構描述物件模型 (SOM) 編譯成驗證用的結構描述資訊。 用於檢查以程式方式建置的 SOM 的語法和語意結構。 語意驗證檢查是在編譯階段執行。

備註

重要

方法 Compile 已在 Microsoft .NET Framework 2.0 版中過時,且已由 XmlSchemaSet.Compile 方法取代。

Compile(ValidationEventHandler)

Source:
XmlSchema.cs
Source:
XmlSchema.cs
Source:
XmlSchema.cs

警告

Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202

警告

XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.

警告

Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202

將 XML 結構描述物件模型 (SOM) 編譯成驗證用的結構描述資訊。 用於檢查以程式方式建置的 SOM 的語法和語意結構。 語意驗證檢查是在編譯階段執行。

public:
 void Compile(System::Xml::Schema::ValidationEventHandler ^ validationEventHandler);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler? validationEventHandler);
[System.Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")]
public void Compile (System.Xml.Schema.ValidationEventHandler? validationEventHandler);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler);
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler);
[<System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler -> unit
[<System.Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler -> unit
[<System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler -> unit
member this.Compile : System.Xml.Schema.ValidationEventHandler -> unit
Public Sub Compile (validationEventHandler As ValidationEventHandler)

參數

validationEventHandler
ValidationEventHandler

驗證事件處理常式,接收 XML 結構描述驗證錯誤的相關資訊。

屬性

備註

重要

方法 Compile 已在 Microsoft .NET Framework 2.0 版中過時,且已由 XmlSchemaSet.Compile 方法取代。

適用於

Compile(ValidationEventHandler, XmlResolver)

Source:
XmlSchema.cs
Source:
XmlSchema.cs
Source:
XmlSchema.cs

警告

Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202

警告

XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.

警告

Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202

將 XML 結構描述物件模型 (SOM) 編譯成驗證用的結構描述資訊。 用於檢查以程式方式建置的 SOM 的語法和語意結構。 語意驗證檢查是在編譯階段執行。

public:
 void Compile(System::Xml::Schema::ValidationEventHandler ^ validationEventHandler, System::Xml::XmlResolver ^ resolver);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler? validationEventHandler, System.Xml.XmlResolver? resolver);
[System.Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")]
public void Compile (System.Xml.Schema.ValidationEventHandler? validationEventHandler, System.Xml.XmlResolver? resolver);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler, System.Xml.XmlResolver resolver);
[System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler, System.Xml.XmlResolver resolver);
public void Compile (System.Xml.Schema.ValidationEventHandler validationEventHandler, System.Xml.XmlResolver resolver);
[<System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler * System.Xml.XmlResolver -> unit
[<System.Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler * System.Xml.XmlResolver -> unit
[<System.Obsolete("Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler * System.Xml.XmlResolver -> unit
member this.Compile : System.Xml.Schema.ValidationEventHandler * System.Xml.XmlResolver -> unit
Public Sub Compile (validationEventHandler As ValidationEventHandler, resolver As XmlResolver)

參數

validationEventHandler
ValidationEventHandler

接收 XML 結構描述驗證錯誤相關資訊的驗證事件處理常式。

resolver
XmlResolver

XmlResolver,用來解析 includeimport 項目中參考的命名空間。

屬性

備註

如果 SOM 透過 importinclude 元素參考其他命名空間,則會 XmlResolver 用來解析這些參考。 如果解析程式設定 null 為 ,這表示使用者不關心解析 importinclude 元素。 在此情況下,不會解析參考。 方法完成之後 Compile ,不會快取解析程式。

重要

方法 Compile 已在 Microsoft .NET Framework 2.0 版中過時,且已由 XmlSchemaSet.Compile 方法取代。

重要

方法 CompileXmlUrlResolver 使用 類別,根據預設解析包含在、匯入或重新定義元素中所參考的外部架構。 您可以藉由傳遞 null 做為 XmlResolver 參數,以停用外部架構的解析。

適用於