title: Converting html text into plain text
body: <p>I have the following HTML:</p>
  
  <pre><code>&lt;div id = "id1"&gt;
      "some text 1"&lt;br&gt;
      "more text 2" &lt;br&gt;
      "name" &lt;br&gt;
      &lt;li&gt; "list 1"&lt;/li&gt;
      "THEend"
      &lt;div class="class1" style="margin: 0px; padding: 0px;"&gt;
        &amp;nbsp;&amp;nbsp;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the following JavaScript:</p>
  
  <pre><code>var contents  = document.getElementsById("id1").innerHTML
  </code></pre>
  
  <p>Currently, the result of <code>contents</code> includes the text from both <code>id1</code> and <code>class1</code> -- but I want to eliminate the contents of <code>class1</code> entirely.</p>
  
  <p>How should I proceed?</p>