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


Validates the [XmlDocument](../) against the XML [Schema](../../../system.xml.schema/) Definition Language (XSD) schemas contained in the [XmlDocument::get_Schemas](../get_schemas/) list.

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


| Parameter | Type | Description |
| --- | --- | --- |
| validationEventHandler | Schema::ValidationEventHandler | The [Schema::ValidationEventHandler](../../../system.xml.schema/validationeventhandler/) object that receives information about schema validation warnings and errors. |

## See Also

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


Validates the [XmlNode](../../xmlnode/) object specified against the XML [Schema](../../../system.xml.schema/) Definition Language (XSD) schemas in the [XmlDocument::get_Schemas](../get_schemas/) list.

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


| Parameter | Type | Description |
| --- | --- | --- |
| validationEventHandler | Schema::ValidationEventHandler | The [Schema::ValidationEventHandler](../../../system.xml.schema/validationeventhandler/) object that receives information about schema validation warnings and errors. |
| nodeToValidate | const SharedPtr\<XmlNode\>\& | The [XmlNode](../../xmlnode/) object created from an [XmlDocument](../) to validate. |

## See Also

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