$xml->serialize($yourData, array('format' => 'tags'));
On Mar 9, 11:25 pm, tobi_one <[email protected]> wrote:
> Thanks Joe for this hint!
> How do you know what format options there are? I can't find any
> suggestions at the API or docs...
>
> Looks like format -> elements is getting closer to what I want.
> Unfortunately the elements are now empty (i.e. elements are defined
> ok, but no data in them)... Any idea what this could be?
>
> Thanks again!
>
> Cheers,
> Tobi
>
> On Mar 9, 9:05 pm, Joe Critchley <[email protected]> wrote:
>
> >http://api.cakephp.org/class/xml-helper#method-XmlHelperserialize
>
> > You can do the following:
>
> > $xml->serialize($yourData, array('format' => 'elements'));
>
> > On Mar 9, 7:45 pm, tobi_one <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm using the xmlHelper andserializeto output an array asXML. This
> > > works ok, except that the outputedXMLuses "attributes"
> > > (http://www.w3schools.com/XML/xml_attributes.asp) instead of standard
> > > elements.
>
> > > Is there a way to change this behaviour? I see there is an option
> > > attribute withserialize, but unfortunately no documentation on what
> > > could be specified there...
>
> > > Cheers,
> > > Tobi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---