Is it possible to use the XML Schema validation and XMLSerializer together?
My project currently uses XMLSerializer. To validate the schema, we are programatically checking the values like:
if(String.IsNullOrEmpty(person.Name))
throw new Exception();
Thanks!
I would suggest using the XmlValidatingReader for validatiing the schema. Please see http://www.codeproject.com/KB/XML/Serialization.aspx for an example…