How to generate XML file on my server?

Hi I have a template of XML file where I need generate a feed of all of my Items (ids, prices, names, etc).

Does any body have exists example of the:

  • php code
  • and in which file I need to instert that

I need a button, after pushing I need regenerate XML file. Thx for any help.

Hi @MakarkinPRO, wich version of cakephp are you using?
In 3.x generate an xml is a peace of cake (siriusly)
In your controller

public function helpMakarkin(){ $this->loadModel('Users'); $users = $this->Users->find('all'); $this->set('users',$users); $this->set('_serialize', ['users']); }

And after that you just call

yourdomain.com/controller/help_makarkin.xml

the .xml is the trick, you will see a beautiful xml generated for you.

Hope this helps, have a nice day.

1 Like

Any recommendation of how to generate file like described here?

here is how to change to ENglish language:
http://screencast.com/t/8SpQCnqrO

Any recommendation, or am I need ask it on the freelance?