Removes the character data.
<?php
$doc = Dom\XMLDocument::createFromString("<container><![CDATA[hello]]><world/></container>");
$cdata = $doc->documentElement->firstChild;
$cdata->remove();
echo $doc->saveXML();
?>
The above example will output:
<?xml version="1.0" encoding="UTF-8"?>
<container><world/></container>