Solved

How to create a simple rss/xml feed/file for blog posts

Posted on 2013-01-07
6
1,224 Views
Last Modified: 2013-11-18
Hi,

I'm creating a simple tool to post some articles in the form of a blog for a website.
Each post will contain a:
- title
- picture of video
- text

Now i'm asked to create a xml feed for these articles. How should i do this, and where should i pay specific attention to?

I searched the internet, but didn't find a satisfying answer.

What will a rss/xml feed/file like this look like?
How much text of each article will be included? The whole article?

The file should also be able to be imported to a wordpress blog for example.

Thanks
0
Comment
Question by:peps03
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
PCableGuy earned 500 total points
ID: 38753118
There's a good explanation here:
http://www.mnot.net/rss/tutorial


And here's more on RSS Version 2.0, it has an example and how to layout the XML tags.
http://www.tutorialspoint.com/rss/rss2.0-tag-syntax.htm
0
 

Author Comment

by:peps03
ID: 38812303
Thanks for your reply PCableGuy.

Your second link shows a nice sample.

How would i build the xml-file to show the preview of multiple blog posts for example?

And will i store this file as i .xml file on my server? I would like to generate the file with php, how should i do that?

Thanks
0
 
LVL 12

Assisted Solution

by:PCableGuy
PCableGuy earned 500 total points
ID: 38817408
To answer a couple of your questions:

Yes, the RSS would be stored on the server. Yes, you can build it from PHP.

The way you build the RSS from PHP would very much depend upon how you are going to store the articles.

You probably need to do store a description of each article in a database if you plan to automate the building of the RSS file using PHP. You can in theory build the RSS file manually in Notepad and upload it your server.

Are you going to store each individual article in a database?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:peps03
ID: 38817834
Yes, each article will be stored in the database.

How would a rss file with multiple blogposts look like?
0
 
LVL 12

Assisted Solution

by:PCableGuy
PCableGuy earned 500 total points
ID: 38820132
It would look similar to the tutorial on this web page where each item tag has a title, link, and a description. In your case, each item tag in the RSS file might be a blog thread.
http://www.xul.fr/en-xml-rss.html#source

Your PHP would query the database to build the XML file.
0
 

Author Closing Comment

by:peps03
ID: 38875204
Thank you!!
Great explanation on these websites!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
microsoft access - xml 10 58
PHP MySQL MySQLi Update Insert, and mapping XML data to MySQL Columns 13 64
XSLT XML 4 14
xpath sql query 2008 8 43
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now