CustomXMLSchemaCollection.Validate method (Office)

Specifies whether the schemas in a schema collection are valid (conforms to the syntactic rules of XML and the rules for a specified vocabulary; a standard for structuring XML).

Syntax

expression.Validate

expression An expression that returns a CustomXMLSchemaCollection object.

Return value

Boolean

Remarks

In addition to determining whether the schemas are valid, this method also traverses the include statements for each schema in the collection and adds the referenced schemas to the source schema.

Example

The following example validates the schema collection and returns the Boolean results to the calling procedure.

Function ValidateSchemas(objSourceCustomXMLSchemaCollection As CustomXMLSchemaCollection) 
Dim boolValid As Boolean 
 
' Validates the schemas in a schema collection. 
boolValid = objSourceCustomXMLSchemaCollection.Validate 
 
ValidateSchemas = boolValid 
   
End Function

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.