## XmlDocument::Validate(Schema::ValidationEventHandler) method


验证 [XmlDocument](../) 对 XML [Schema](../../../system.xml.schema/) 定义语言 (XSD) 架构，这些架构包含在 [XmlDocument::get_Schemas](../get_schemas/) 列表中。

```cpp
void System::Xml::XmlDocument::Validate(Schema::ValidationEventHandler validationEventHandler)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| validationEventHandler | Schema::ValidationEventHandler | 接收关于架构验证警告和错误信息的 [Schema::ValidationEventHandler](../../../system.xml.schema/validationeventhandler/) 对象。 |

## 另见

* Typedef [ValidationEventHandler](../../../system.xml.schema/validationeventhandler/)
* Class [XmlDocument](../)
* Namespace [System::Xml](../../)
* Library [Aspose.Page for C++](../../../)
## XmlDocument::Validate(Schema::ValidationEventHandler, const SharedPtr\<XmlNode\>\&) method


验证指定的 [XmlNode](../../xmlnode/) 对象，对 XML [Schema](../../../system.xml.schema/) 定义语言 (XSD) 架构，这些架构位于 [XmlDocument::get_Schemas](../get_schemas/) 列表中。

```cpp
void System::Xml::XmlDocument::Validate(Schema::ValidationEventHandler validationEventHandler, const SharedPtr<XmlNode> &nodeToValidate)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| validationEventHandler | Schema::ValidationEventHandler | 接收关于架构验证警告和错误信息的 [Schema::ValidationEventHandler](../../../system.xml.schema/validationeventhandler/) 对象。 |
| nodeToValidate | const SharedPtr\<XmlNode\>\& | 用于验证的从 [XmlDocument](../) 创建的 [XmlNode](../../xmlnode/) 对象。 |

## 另见

* Typedef [ValidationEventHandler](../../../system.xml.schema/validationeventhandler/)
* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XmlNode](../../xmlnode/)
* Class [XmlDocument](../)
* Namespace [System::Xml](../../)
* Library [Aspose.Page for C++](../../../)
