Unfortunately, this ability was left out of Cake's XML class, which is just a wrapper for returning either a SimpleXML or DOMDocument object. The latter's doctype property is read-only. In order to have a doctype one needs to jump through some hoops:
http://pointbeing.net/weblog/2009/03/adding-a-doctype-declaration-to-a-domdocument-in-php.html With SimpleXML, you can include the doctype in the string that you feed to the constructor. See here (not the accepted answer but those below): http://stackoverflow.com/questions/1397036/how-to-convert-array-to-simplexml On Wed, Nov 28, 2012 at 1:44 AM, technobulka <technobu...@gmail.com> wrote: > How to add doctype after <?xml version="1.0" encoding="UTF-8"?>? > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com. > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.