Validate()

XmlDocument::Validate(Schema::ValidationEventHandler) method

Validates the XmlDocument against the XML Schema Definition Language (XSD) schemas contained in the XmlDocument::get_Schemas list.

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

Arguments

ParameterTypeDescription
validationEventHandlerSchema::ValidationEventHandlerThe Schema::ValidationEventHandler object that receives information about schema validation warnings and errors.

Exceptions

ExceptionDescription
XmlSchemaValidationExceptionA schema validation event occurred and no Schema::ValidationEventHandler object was specified.

XmlDocument::Validate(Schema::ValidationEventHandler, const SharedPtr<XmlNode>&) method

Validates the XmlNode object specified against the XML Schema Definition Language (XSD) schemas in the XmlDocument::get_Schemas list.

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

Arguments

ParameterTypeDescription
validationEventHandlerSchema::ValidationEventHandlerThe Schema::ValidationEventHandler object that receives information about schema validation warnings and errors.
nodeToValidateconst SharedPtr<XmlNode>&The XmlNode object created from an XmlDocument to validate.

Exceptions

ExceptionDescription
ArgumentExceptionThe XmlNode object parameter was not created from an XmlDocument.
InvalidOperationExceptionThe XmlNode object parameter is not an element, attribute, document fragment, or the root node.
XmlSchemaValidationExceptionA schema validation event occurred and no Schema::ValidationEventHandler object was specified.

See Also