title: Xml Empty Tag Deserialization
body: <p>Could you please help me to find the solution to deserialize xml file which contains an empty tag?</p>
  
  <p>Example is here:</p>
  
  <pre><code>&lt;Report&gt;
      &lt;ItemsCount&gt;&lt;/ItemsCount&gt;
  &lt;/Report&gt;
  </code></pre>
  
  <p>And I want to deserialize it into object of class like:</p>
  
  <pre><code>public class Report{
      public int? ItemsCount { get;set;}
  }
  </code></pre>
  
  <p>my xml schema which i'm using in deserialization is:</p>
  
  <pre><code>[XmlRoot]
  public partial class Report
  {
     private int? itemsCount;
  
     [XmlElement(IsNullable = true)]
     public int? ItemsCount {
        get
        {
             return itemsCount;
        }
        set
        {
             itemsCount = value;
        }
  }
  </code></pre>
  
  <p>It works well if the ItemsCount tag is missing at all, but if it is exist and is empty at the same moment, in that case it throwing the exception regarding lines there this tag is located in xml.</p>
  
  <p>I saw a lot of links here while trying to find the solution, but without success. </p>
  
  <p>And also, i don't want to just ignore the tag for all the cases, i want to get a null value instead then it is empty.</p>