Hello,
I have an XML file where several nodes are created as CDATA sections.
$catPubName = $doc->createElement("catPubName");
$catPubName->appendChild($doc->createCDATASection($publ));
$baseCat->appendChild($catPubName);
XML is correct:
<catPubName><![CDATA[Ounad.prew]]></catPubName>
Now, when I insert new values to them via HTML form and PHP
$cPub=$cat->getElementsByTagName("catPubName");
$cPub->item(0)->nodeValue=$pubName;
the node data is not CDATA any more:
<catPubName>Neeruti.prew</catPubName>
Is there a way to keep the CDATA while changing the value? Or should I remove the node and create it anew?
Thanks in advance for any clues:-)