title: How to remove an element from a group of elements?
body: <p>Given the code below:</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;a&lt;/div&gt;
  &lt;div&gt;b&lt;/div&gt;
  &lt;div&gt;c&lt;/div&gt;
  </code></pre>
  
  <p><strong>JS:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>Document doc = Jsoup.parse(baseHtml);
  Elements elements = doc.select("div");
  elements.get(1).remove();
  // remove doesn't affect elements. why?
  elements.size();   // equal 3
  // but this works
  doc.outerHtml() // &lt;div&gt;a&lt;/div&gt;&lt;div&gt;c&lt;/div&gt;
  </code></pre>
  
  <p>Do I have to use this code to get removed elements? It seems too verbose.</p>
  
  <pre class="lang-js prettyprint-override"><code>Document doc = Jsoup.parse(baseHtml);
  Elements elements = doc.select("div");
  elements.get(1).remove();
  elements = doc.select("div");
  </code></pre>