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)

Usage

Dim xMLNode1 As XMLNode
xMLNode1.Validate()

Syntax

Sub Validate()
void Validate();
public: Void Validate();
public void Validate();
function Validate();

Remarks

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

XMLNode Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

XMLNode Members