aniesh82 Posted October 22, 2008 Share Posted October 22, 2008 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 Link to comment https://forums.phpfreaks.com/topic/129508-solved-domdocumentcreate_cdata_section-is-not-working-in-php-523/ Share on other sites More sharing options...
xylex Posted October 22, 2008 Share Posted October 22, 2008 Try createCDATASection() In the manual, you want the stuff under DOM, not DOM XML. Confusing, I know. Link to comment https://forums.phpfreaks.com/topic/129508-solved-domdocumentcreate_cdata_section-is-not-working-in-php-523/#findComment-671467 Share on other sites More sharing options...
aniesh82 Posted October 22, 2008 Author Share Posted October 22, 2008 It works. Thank you for your reply. Regards, An.Joseph. Link to comment https://forums.phpfreaks.com/topic/129508-solved-domdocumentcreate_cdata_section-is-not-working-in-php-523/#findComment-671495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.