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 Quote 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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.