<?php $xml = <<<'XML' <ul> <ul><li>Hello World!</li></ul> </ul> XML; $document = new DOMdocument(); $document->loadXML($xml); $xpath = new DOMXpath($document); foreach ($xpath->evaluate('//text()[contains(., "Hello World!")]') as $textNode) { $textNode->textContent = 'FooBar'; } echo $document->saveXML();
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`