Re: XML doctype

2012-11-28 Thread lowpass
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  wrote:
> How to add doctype after ?
>
> --
> 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.




Re: XML doctype

2012-11-27 Thread Chetan Patel
echo $this->Xml->header();

// generates: 


You can pass in a different version number and encoding type as parameters
of the header method.

echo $this->Xml->header(array('version'=>'1.1'));
// generates: 




-- 
Thanks & Regards

Chetan Patel

-- 
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.




XML doctype

2012-11-27 Thread technobulka
How to add doctype after **?

-- 
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.