title: XmlSchema reading annotation at <schema> level
body: <p>I've created a schema definition that starts like the following ...</p>
  
  <pre><code>&lt;xs:schema attributeFormDefault="unqualified"  elementFormDefault="qualified" targetNamespace="urn:my.namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:it="urn:mynamespace"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;My annotation&lt;/xs:appinfo&gt;
    &lt;/xs:annotation&gt;
  </code></pre>
  
  <p>Then I load the schema and I compile it with:</p>
  
  <pre><code>System.Xml.Schema.XmlSchemaSet set = new System.Xml.Schema.XmlSchemaSet();
                                      set.Add(schema);
                                      set.Compile();
  </code></pre>
  
  <p>but I can't manage to get back my annotation, what am I missing ?</p>
  
  <p><strong>Addition:</strong>
  Thankd to Morawski reply, the code I ended up is:</p>
  
  <pre><code>string appInfoValue = string.Empty;
                                      var annotation = schema.Items.OfType&lt;XmlSchemaAnnotation&gt;().FirstOrDefault();
                                      if (null != annotation)
                                      {
                                          var appInfo = annotation.Items.OfType&lt;XmlSchemaAppInfo&gt;().FirstOrDefault();
                                          if (null != appInfo)
                                          {
                                              appInfoValue = appInfo.Markup[0].InnerText;
                                          }
                                      }
  </code></pre>
  
  <p>Well, I really suppossed that should be simpler :)</p>