jsoup remove div with a certain class
<p>I have a list in <code>jsoup</code> like this:</p>

<pre><code>Elements tbody = new Elements();
</code></pre>

<p><code>tbody</code> might look like this (<code>----</code> separates elements in <code>tbody</code> list):</p>

<pre><code>&lt;td&gt; 
 &lt;div data-emission="56b2140adb6da7bf3cbf6228" class="mainCell"&gt; 
  &lt;a href="/tv/weather-country-12457/"&gt; &lt;span class="left"&gt;16:00&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;Weather - country&lt;/p&gt; 
   &lt;/div&gt; &lt;/a&gt; 
 &lt;/div&gt; 
 &lt;div data-emission="56b2140adb6da7bf3cbf6237" class="mainCell shows pending"&gt; 
  &lt;a href="/shows/that's-70-show-550347/epi1201/"&gt; &lt;span class="left"&gt;16:10&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;That's 70 show&lt;/p&gt; 
    &lt;span class="info"&gt;epi. 1201, Show&lt;/span&gt; 
   &lt;/div&gt; &lt;p class="onAir"&gt; &lt;span&gt;Pending&lt;/span&gt; &lt;u&gt;&lt;/u&gt; &lt;u style="width: 5%"&gt;&lt;/u&gt; &lt;/p&gt; &lt;/a&gt; 
 &lt;/div&gt; &lt;/td&gt;
 ---------------------------------------------------------------------------
 &lt;td&gt; 
 &lt;div data-emission="56b23876db6da7bf3cbf6588" class="mainCell pending"&gt; 
  &lt;a href="/tv/weather-563806/"&gt; &lt;span class="left"&gt;16:10&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;Weather&lt;/p&gt; 
   &lt;/div&gt; &lt;p class="onAir"&gt; &lt;span&gt;Pending&lt;/span&gt; &lt;u&gt;&lt;/u&gt; &lt;u style="width: 51%"&gt;&lt;/u&gt; &lt;/p&gt; &lt;/a&gt; 
 &lt;/div&gt; 
 &lt;div data-emission="56b23876db6da7bf3cbf6589" class="mainCell"&gt; 
  &lt;a href="/tv/animal-cops-2615/"&gt; &lt;span class="left"&gt;16:15&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;Animal Cops&lt;/p&gt; 
    &lt;span class="info"&gt;epi. 3079, Show&lt;/span&gt; 
   &lt;/div&gt; &lt;/a&gt; 
 &lt;/div&gt; 
 &lt;div data-emission="56b23876db6da7bf3cbf658a" class="mainCell shows"&gt; 
  &lt;a href="/show/house-md-1601/odc137/"&gt; &lt;span class="left"&gt;16:30&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;House MD&lt;/p&gt; 
    &lt;span class="info"&gt;epi. 137, Show&lt;/span&gt; 
   &lt;/div&gt; &lt;/a&gt; 
 &lt;/div&gt; &lt;/td&gt;
 ---------------------------------------------------------------------------
 &lt;td&gt; 
 &lt;div data-emission="56b213b3db6da7bf3cbf61a1" class="mainCell movies pending"&gt; 
  &lt;a href="/movie/star-trek-564170/"&gt; &lt;span class="left"&gt;16:00&lt;/span&gt; 
   &lt;div&gt; 
    &lt;p&gt;Star Trek&lt;/p&gt; 
    &lt;span class="info"&gt;Movie&lt;/span&gt; 
    &lt;span class="szh prem"&gt;| Premiere&lt;/span&gt; 
   &lt;/div&gt; &lt;p class="onAir"&gt; &lt;span&gt;Pending&lt;/span&gt; &lt;u&gt;&lt;/u&gt; &lt;u style="width: 21%"&gt;&lt;/u&gt; &lt;/p&gt; &lt;/a&gt; 
 &lt;/div&gt; &lt;/td&gt;
</code></pre>

<p>My goal is to remove every movie/show that is pending/onAir. So in this example i would like to get rid of a whole <code>div</code> that has:</p>

<ul>
<li><code>that's 70 show</code> </li>
<li><code>weather</code> </li>
<li><code>star trek</code></li>
</ul>

<p>f.e:</p>

<pre><code>for(int i = 0; i &lt; tbody.size(); i++){
            tbody.get(i).select("div").select("p").select(".onAir").remove();
        }
</code></pre>

<p>It removes only an element itself, not a whole <code>div</code>. I have tried in many ways but unsuccessfully. I will appreciate any help.</p>