title: XPath to select and concatenate all text nodes
body: <p>I'm scraping data from a website which looks like this:</p>
  
  <pre><code>&lt;div class="content"&gt;
    &lt;blockquote&gt;
      &lt;div&gt;
        Do not select this.
      &lt;/div&gt;
      How do I select only this…
      &lt;br /&gt;
      and this…
      &lt;br /&gt;
      and this in a single node?
    &lt;/blockquote&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Suppose a snippet like this appears 20 times on a single page and I want to get all of the text within the <code>&lt;blockquote&gt;</code> but ignore everything within child nodes such as the inner <code>div</code>.</p>
  
  <p>I therefore use:</p>
  
  <pre><code>html %&gt;%
    html_nodes(xpath = "//*[@class='content']/blockquote/text()[normalize-space()]")
  </code></pre>
  
  <p>However, this separates <code>How do I select only this…</code>, <code>and this…</code>, <code>and this in a single node?</code> into individual elements within the <code>xml_nodeset</code> structure.</p>
  
  <p>What should I do to essentially concatenate all these text nodes into one and return the same 20 elements (or a single one in case all I had was just this example)?</p>