Validate Method
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

XMLNode.Validate Method

Verifies an individual XML element or the entire document against the attached XML schema or schemas.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

void Validate()

Use the Validate method with the ValidationStatus and ValidationErrorText properties to determine if an XML element is valid against the applied schema and what error text to display to the user. Use the SetValidationError method to override the schema violations with custom validation errors.

When you run the Validate method, Microsoft Word populates the XMLSchemaViolations collection with the XML nodes that have validation errors.

Show:
© 2016 Microsoft