note 34618 rejected from function.domdocument-create-cdata-section by didou

From: Date: Fri, 01 Aug 2003 14:12:57 +0000
Subject: note 34618 rejected from function.domdocument-create-cdata-section by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53142@lists.php.net to get a copy of this message
Note Submitter: ceinwen@ifrance.com ---- how do i can create a cdata section with this function ? I try this : <? $xml_doc = new_xmldoc("1.0"); $root = $xml_doc->add_root("root"); $Parent=$root->new_child("element", ""); $oCData = $xml_doc->create_cdata_section("bla bla bla"); $Parent->append_child($oCData); echo $xml_doc->dumpmem(); ?> And the result is : <?xml version="1.0"?> <root> <element></element> <![CDATA[bla bla bla]]> </root> But i want this : <?xml version="1.0"?> <root> <element><![CDATA[bla bla bla]]></element> </root> i can i do ?

« previous php.notes (#53142) next »