I'm studying the DiDom library. I need to find all the text nodes (links should be ignored) and modify them. That's not how it works:
$document = new Document($text);$element = $document->find('body');$texts = $element[0]->findInDocument("*:not(a)::text()");foreach ($texts as $key => $value) { $value = "xxx";}echo $document->html();
How is it possible to do this?
P.S.: This can be done in the "Simple HTML DOM", but I can't make a correct selector there:(