Validation XML with XSD
<p>I try to validate my XML with XSD File. But I have some doubts that it validate it in any case. Here is the code of validation:</p>

<pre><code> var schemaFileName = directory + fileInfo.Name;
                                XmlSchemaSet schemas = new XmlSchemaSet();
                                schemas.Add(null, schemaFileName);
                                string msg = "";
                                xdoc.Validate(schemas, (o, e) =&gt;
                                                           {
                                                               msg = e.Message;
                                                           });
</code></pre>

<p>So if there is a validation error msg is not empty as I think. But when I take xml that is surely not ok for this scheme msg is empty.</p>
