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,346
  • 3
  • 31
  • 69

0 Answers0