title: Jsoup - extracting text
body: <p>I need to extract text from a node like this:</p>
  
  <pre><code>&lt;div&gt;
      Some text &lt;b&gt;with tags&lt;/b&gt; might go here.
      &lt;p&gt;Also there are paragraphs&lt;/p&gt;
      More text can go without paragraphs&lt;br/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I need to build:</p>
  
  <pre><code>Some text &lt;b&gt;with tags&lt;/b&gt; might go here.
  Also there are paragraphs
  More text can go without paragraphs
  </code></pre>
  
  <p><code>Element.text</code> returns just all content of the div. <code>Element.ownText</code> - everything that is not inside children elements. Both are wrong. Iterating through <code>children</code> ignores text nodes.</p>
  
  <p>Is there are way to iterate contents of an element to receive text nodes as well. E.g.</p>
  
  <ul>
  <li>Text node - Some text</li>
  <li>Node &lt;b>  - with tags</li>
  <li>Text node - might go here.</li>
  <li>Node &lt;p>  - Also there are paragraphs</li>
  <li>Text node -  More text can go without paragraphs</li>
  <li>Node &lt;br> - &lt;empty></li>
  </ul>