Compiles the XML Schema Object Model (SOM) into schema information for validation. Used to check the syntactic and semantic structure of the programmatically built SOM. Semantic validation checking is performed during compilation.
The XmlSchema.Compile(ValidationEventHandler) method is obsolete in the Microsoft .NET Framework version 2.0 and has been replaced by the XmlSchemaSet.Compile method.