I am planning to try to use XML Serialization in C# but I am wondering if I get a .xml file how do I check if the xml file confirms to the right type?
Like usually you would make a schema that you can validate against to make sure if it confirms to the right format.
Can you hook a schema up to to XML Serialization or does it do this checking automatically?
Thanks
You tell the deserializer what type you are expecting. Deserialization will fail if the xml is not of the expected type’s serialized format.http://msdn.microsoft.com/en-us/library/dsh84875.aspx
Try this:
http://www.codeproject.com/KB/XML/Serialization.aspx