0

I am trying to get all the text content of this div:

<div id="content">
    I want<br />
    all this<br />
    text.
</div>

I have tried:

//div[@id="content"]//*/text()

//div[@id="content"]/text()

//div[@id="content"]/descendant::*/text()

Using:

$contents = $result[0]->nodeValue;
beingalex
  • 2,416
  • 4
  • 32
  • 71

0 Answers0