DomQuery::replace();
Replaces all matched elements from the previous XPath expression with an instance of DOMElement.
$DomQuery = new DomQuery;
$DomQuery->load($xml)->path('//foo')->replace($DomQuery->createElement('merp', 'flakes'));
Definition:
public function replace(DOMElement $Element)
Parameters:
| Name | Type | Description |
|---|---|---|
| $Element | Object | The content to replace the matched elements. |