Synchronous XML Schema Validation? .NET 3.5
问题 I know I can validate xml against a schema using a callback method like the following, but is there a way that I can do it synchronously instead of event driven? One way I thought of would be to set a class member boolean flag IsValidated=false then call xml.Validate(ValidationEventHandler). The event handler would set IsValidated=true once it's finished. In the mean time, do a loop checking until the flag is set to true then continue. This is for .Net 3.5. public bool ValidateSchema(string