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

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

Hi,

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...
http://www.seochat.com/c/a/search-engine...ed-search/

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
Reply
#2

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
Reply
#3

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,

Paul.
Reply
#4

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
Reply
#5

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

http://code.tutsplus.com/tutorials/build...--net-7811
http://derekallard.com/index.php/blog/po...e-igniter/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB