title: Can I include white space between all html text() elements in Jsoup
body: <p>I want to use Jsoup to extract all text from an HTML page and return a single string of all the text without any HTML. The code I am using half works, but has the effect of joining elements which affects my keyword searches against the string.</p>
  
  <p>This is the Java code I am using:</p>
  
  <pre><code>String resultText = scrapePage(htmldoc);
  
  private String scrapePage(Document doc) {
      Element allHTML = doc.select("html").first();
      return allHTML.text();
  }
  </code></pre>
  
  <p>Run against the following HTML:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;h1&gt;Title&lt;/h1&gt;
      &lt;p&gt;here is para1&lt;/p&gt;
      &lt;p&gt;here is para2&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Outputting resultText gives <strong>"Titlehere is para1here is para2"</strong> meaning I can't search for the word "para1" as the only word is "para1here".</p>
  
  <p>I don't want to split document into further elements than necessary (for example, getting all H1, p.text elements as there is such a wide range of tags I could be matching </p>
  
  <p>(e.g. <strong>data1data2</strong> would come from):</p>
  
  <pre><code>&lt;td&gt;data1&lt;/td&gt;&lt;td&gt;data2&lt;/td&gt;
  </code></pre>
  
  <p>Is there a way if can get all the text from the page but also include a space between the tags? I don't want to preserve whitepsace otherwise, no need to keep line breaks etc. as I am just preparing a keyword string. I will probably trim all white space otherwise to a single space for this reason.</p>