The following will help someone understand the validation of
XML files against the XML schema definition (XSD). Let us assume that we have
an XML file and XSD file. We need to validate this XML file before we perform operations
on it. The code snippets shown below are in written in the C# language. Some of
the classes used were introduced in .NET Framework 2.0.