PHP : Function Reference : DOM Functions : DOMDocument->createCDATASection()
loathsome
Here's a function that will create a CDATA-section around a string coming from SimpleXML.
<?php
function sxml_cdata($path, $string){
$dom = dom_import_simplexml($path);
$cdata = $dom->ownerDocument->createCDATASection($string);
$dom->appendChild($cdata);
}
?>
|