I want to skip the empty element creation in XML file during the xml Serialization in C#.
Ex :
ArrayElements elm = new ArrayElements
{ Items =new string[] "Item1", " ", "Item2", " ", " ", "Items" } };
During the serialization it should skip the empty strings.
This is my class :
[Serializable]
public class ArrayElements
{
[XmlElement(IsNullable=false)]
public string[] Items { get; set; }
}