语言

XmlSchema.Compile 方法

定义

将 XML 架构对象模型(SOM)编译为架构信息进行验证。 用于检查以编程方式生成的 SOM 的语法和语义结构。 在编译期间执行语义验证检查。

重载

名称 说明
Compile(ValidationEventHandler)
已过时.
已过时.
已过时.

将 XML 架构对象模型(SOM)编译为架构信息进行验证。 用于检查以编程方式生成的 SOM 的语法和语义结构。 在编译期间执行语义验证检查。

Compile(ValidationEventHandler, XmlResolver)
已过时.
已过时.
已过时.

将 XML 架构对象模型(SOM)编译为架构信息进行验证。 用于检查以编程方式生成的 SOM 的语法和语义结构。 在编译期间执行语义验证检查。

注解

Important

Compile 方法在 Microsoft .NET Framework 版本 2.0 中已过时,已被 XmlSchemaSet.Compile 方法替换。

Compile(ValidationEventHandler)

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

注意

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. https://go.microsoft.com/fwlink/?linkid=14202

注意

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("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. https://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. 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("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. https://go.microsoft.com/fwlink/?linkid=14202")>]
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 架构验证错误的信息的验证事件处理程序。

特性

注解

Important

Compile 方法在 Microsoft .NET Framework 版本 2.0 中已过时,已被 XmlSchemaSet.Compile 方法替换。

适用于

Compile(ValidationEventHandler, XmlResolver)

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

注意

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. https://go.microsoft.com/fwlink/?linkid=14202

注意

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("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. https://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. 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("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. https://go.microsoft.com/fwlink/?linkid=14202")>]
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用于解析引用的include命名空间和import元素。

特性

注解

如果 SOM 通过 import 或 include 元素引用其他命名空间, XmlResolver 则用于解析这些引用。 如果解析程序设置为 null,则表示用户不关心解析 import 或 include 元素。 在这种情况下,不会解析引用。 方法完成后不会缓存 Compile 解析程序。

Important

Compile 方法在 Microsoft .NET Framework 版本 2.0 中已过时,已被 XmlSchemaSet.Compile 方法替换。

Important

默认情况下,Compile该方法XmlUrlResolver使用类解析在包含、导入或重新定义元素中引用的外部架构。 可以通过将 null 作为 XmlResolver 参数传递 null 来禁用外部架构的解析。

适用于