Hi;
If I have an xml file and a schema file and I want to validate that the xml
file matches the schema - is this the best way? (This code works, I just want
to make sure I am doing this the best way.)
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessSchemaLocation |
XmlSchemaValidationFlags.ReportValidationWarnings;
XmlSchemaSet sc = new XmlSchemaSet();
sc.Add(null, schemaUrl);
settings.Schemas = sc;
reader = XmlReader.Create(url, settings);
while (reader.Read())
;
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm