Welcome Guest, Not a member yet? Register   Sign In
How can I create a custom XML feed?

(This post was last modified: 10-05-2015, 12:57 PM by alexandervj.)


I need to create a custom XML feed so that our jobs page gets indexed in simply hired. RSS-XML feeds are not acceptable for submitting jobs, they have their own XML tags to use here...

I dont really know anything about XML or creating an XML feed. It looks like they give you just about everything you need in the article. But how do I create the feed with CodeIgniter? The rest of the site is created with CodeIgniter. 
Thanks for your help

Basically the same way as you genterate a html page with codeigniter...grab data, manipulate it, output it. Except you'd just be outputting xml instead of html.

You can use the DOMDocument object/methods: http://www.phpeveryday.com/articles/PHP-...-P413.html

I have not done an XML feed in codeigniter but I am sure you will have no problems at all.

XML is just an alternative markup language like HTML (but not HTML) which was designed specifically for transferring data.

So your controller just collects your data as it would for a normal page, and loads a view that has xml markup rather than html markup. The url to that controller is then your feed url. If you visit it in a browser it is not very pretty, but it is not HTML.

Hope that helps,


Thanks for the replies, they were very helpful. I think I understand it a little better now. I guess I'll just give it a try and see what happens

Refer the following tutorials, might you will be able to build a feed for any custom website.


Theme © iAndrew 2016 - Forum software by © MyBB