title: How to eliminate line breaks and spaces around text in xPath
body: <p>There is a page like the following:</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
     &lt;p&gt;&amp;nbsp;&amp;nbsp;5-8&amp;nbsp;&amp;nbsp;&lt;/p&gt;
     &lt;p&gt;&lt;/br&gt;5-8&lt;/br&gt;&lt;/p&gt;
     &lt;p&gt;&amp;nbsp;&lt;/br&gt;5-8&amp;nbsp&lt;/br&gt;&lt;/p&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>The goal is to abstract the text in each p, the breaks and whitespaces are not wanted.
  How to achieve that?<br />
  Thanks in advance! Best Wishes!</p>
  <p>--The first Updating
  Another post suggested using normalize_space(). I tried that, well, It can remove the spaces. However,  only one node is left. How can I get all 30 node text without unwanted spaces? Thanks in advance and Best wishes!</p>
  <p><a href="https://i.stack.imgur.com/pEw9r.png" rel="nofollow noreferrer">enter image description here</a></p>