Jump to content

[SOLVED] DOMDocument::create_cdata_section() is not working in php 5.2.3


aniesh82

Recommended Posts

 

Hi,

 

I got the following errors, when I tried to create an XML file that used a CDATA creation function:

 


Fatal error: Call to undefined method DOMDocument::create_cdata_section() in xx/xx/create_cdata.php on line 10

 


$dom 	= 	new DOMDocument('1.0');
$feeds	=	$dom->createElement('feeds');
$dom->appendChild($feeds);

$feed		=	$dom->createElement('feed');

// Create CDATA
$urlcdata 	=	$dom->create_cdata_section("Cdata Content");
$feed->appendChild($urlcdata);
$feeds->appendChild($feed);

echo $dom->saveXML();

 

Please help me to solve this.

 

Thank You,

An. Joseph

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.