title: Extract all Text from child elements/node using xpath text() function
body: <p>I am using scrapy and want to get all text for Child Node . I am below command in scrapy for getting the text</p>
  <pre><code>response.xpath('//div[@class=&quot;A&quot;]/text()').get()
  </code></pre>
  <p>I am expecting result :&quot;1 -120u&quot;</p>
  <pre><code>&lt;div class=&quot;A&quot;&gt;
  &lt;span id=&quot;B&quot; class=&quot;C&quot;&gt;
  &lt;span&gt;1&amp;nbsp;&lt;/span&gt;-110o&lt;/span&gt;
  &lt;span id=&quot;B&quot;&gt;
  &lt;span&gt;1&amp;nbsp;&lt;/span&gt;
  -120u&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I have also tried below things that I discovered on stackoverlow</p>
  <pre><code>response.xpath('//div[@class=&quot;A&quot;]/text()').getall()
  response.xpath('//div[@class=&quot;A&quot;]/text()').extract()
  response.xpath('//div[@class=&quot;A&quot;]//text()').get()
  response.xpath('//div[@class=&quot;A&quot;]//text()').getall()
  response.xpath('//div[@class=&quot;A&quot;]/text()').extract()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Hdr0T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hdr0T.png" alt="My Trail and Test in scrapy shell" /></a></p>