title: Check if tags are empty
body: <p>I have an XML file that I am parsing through BeautifulSoup. A small portion of my file is:</p>
  
  <pre><code>&lt;document&gt;
      &lt;ad&gt;
          &lt;date&gt;21-Apr-2013&lt;/date&gt;
      &lt;/ad&gt;
      &lt;ad&gt;
          &lt;date&gt;&lt;/date&gt;
      &lt;/ad&gt;
  &lt;/document&gt;
  </code></pre>
  
  <p>What is the fastest way to count the number of <code>date</code> elements that are not empty? Will this be faster if I convert <code>date</code> to an attribute of <code>ad</code>?</p>