XML Schema for analysis in C#
<p>Is it possible to use a XML Schema to check against the contents of a XML file?</p>

<p>For instance, in ASP.NET <code>web.config</code>, can I create a schema to check that <code>&lt;customErrors mode = "On"&gt;</code>? This will ultimately be used in a C# app, the C# app should take in the XML document and the XML Schema and check if the XML Document violates any of the "rules" listed in the XML schema, i.e. <code>&lt;customErrors mode = "Off"&gt;</code></p>

<p>Is it possible to do the checking without any boundary to the structure of the XML file? i.e. the attribute <code>&lt;customErrors&gt;</code> can be within any part of the XML document and the schema will still work.</p>