title: C# XML Serialization of an array - Skip "empty" string values
body: <p>I want to skip the empty element creation in XML file during the xml Serialization in C#.</p>
  
  <p>Ex :</p>
  
  <pre><code>ArrayElements elm = new ArrayElements 
  { Items =new string[]  "Item1", " ", "Item2", " ", " ", "Items" } };
  </code></pre>
  
  <p>During the serialization it should skip the empty strings.</p>
  
  <p>This is my class :</p>
  
  <pre><code>[Serializable]
  public class ArrayElements
  {
      [XmlElement(IsNullable=false)]
      public string[] Items { get; set; }
  }
  </code></pre>