title: XmlIgnore not working
body: <p>I have an object that I am trying to serialise and the output looks something like this: </p>
  
  <pre><code> &lt;root&gt;
    &lt;Items&gt;
      &lt;Item&gt;   
        &lt;Value&gt; blabla &lt;/Value&gt;
      &lt;/Item&gt;  
    &lt;/Items&gt;
  </code></pre>
  
  <p>where Item is a class that the class root uses. </p>
  
  <pre><code>[Serializable]
  [XmlType("root")]
  public class Root { }
  
  [Serializable]
  [XmlInclude(typeof(Item))]
  public class Items {}
  
  [Serializable]
  public class Item 
  { 
      [XmlElement("Value")]
      public string DefaultValue { get; set; }
  }
  </code></pre>
  
  <p>In some cases I want to ignore the value of value and I have this code</p>
  
  <pre><code> var overrides = new XmlAttributeOverrides();
   var attributes = new XmlAttributes { XmlIgnore = true };
   attributes.XmlElements.Add(new XmlElementAttribute("Item"));                  
   overrides.Add(typeof(Item), "Value", attributes);               
   var serializer = new XmlSerializer(typeof(root), overrides);
  </code></pre>
  
  <p>but the value is still written in the output. </p>
  
  <p>What am I doing wrong?</p>