 |
 |
Recent
Articles |
Hit Counter 2.0, Or "Web 2.0 Metrics" Way back in the early days of the Web (you know, before AdSense, blog spam, web mail, and dynamic HTML) were these things called hit counters.
The ROR Advantage: No Spider Discrimination! Search engine optimization is a very complex science, but at its heart is the simple rule: to format your website in such a way that spiders can immediately recognize and index its content.
Webtop, RIA, And "Webified" There were some interesting discussions late last week regarding Rich Internet Applications (RIA), a new term called "webified", and the webtop.
Firefox 2 Beta 2 Available To You The obligatory notice about the Firefox 2 Beta 2 browser being a developer preview release made available for testing purposes only has been duly noted. Now start those FTP clients and grab that...
Go Jam With Google Code The fourth annual coding competition presented by Google offers the top 100 programmers in the contest cash prizes.
WYSIWYG and Wikis Notes from a technical session at Wikimania on WYSIWYG. Christoph Sauer questions if WYSIWYG is a good thing, based on his experience with a wiki within his technical university in Germany...
Yahoo Search SDK Updated Newer libraries and new languages for Yahoo Search's software development kit have brought support for Ruby, Lua, and Ajax widgets to developers.
Webmaster Questions For CMS Developers efore Oneupweb, I worked at an online children's store. One of my many duties there (my desk was always covered in toys) was to manage our store's migration to an entirely new e-commerce platform.
|
|
 |
Recent WebProNews Articles |
Googlebot Wields New Crawl Tools Bringing your website into the voluminous BigTable of Google's index involves sending out pieces of code, referred to as spiders or crawlers affectionately named "Googlebot," to pick up your site. Google Webmaster Central has some tips for webmasters showing...
Google: The Virtual Roman Empire Google is on the cusp of establishing a virtual dynasty by exerting prominent influence in the ways people access, manage, and respond to information. Could we be witnessing the birth of a new empire?
Google Chases The Sun The blissful warmth that caresses the Googleplex and its volleyballing, Crocs-wearing, code-crunching Googlers will power 30 percent of the peak energy consumption at its headquarters through the largest installation of solar panels on any US corporate campus.
MySpace Vs. YouTube – Google Wins?
MySpace has implemented various changes over the weekend to increase exposure of video sharing and hosting features to its users. The changes are designed to simplify the process of adding video content to MySpace profiles.
Wal-Mart, Edelman Flogged For Blog A travel blog featuring a couple traveling the country by RV and camping in Wal-Mart parking lots turned out to be a fake, its pro-Wal-Mart message backed by the Edelman PR firm.
Is There Life After Wikipedia? Pondering where surfers go after Wikipedia is interesting enough, but what was more interesting was the cyclical pattern of behavior among them that begins with Google and ends with Google or Google-related services (just to generalize - you could say search - Wikipedia...
Yahoo Pressed From All Sides Declining ad sales in the finance and automotive markets, a delayed launch of a new contextual ad service, and splashy acquisitions by Google have left Yahoo feeling like the last grape in a wine press.
|
|
|
10.18.06
Creating An RSS 2.0 Feed
ByPete Freitag
If you can learn HTML, you can easily learn how to build your own RSS 2.0 feeds. I'll take you through the steps to creating an RSS feed from scratch.
Step 1: XML Declaration
Since RSS 2.0 must validate as XML, the first line in your rss feed must be the XML declaration.
The encoding is optional but recommended. If your using something other than UTF-8 be sure to change the above line.
Note: If you are using CFML and have whitespace due to the Application.cfm file you can reset the output buffer using <cfcontent reset="true">
Step 2: RSS Channel
In this step we need to open up the rss tag, and the channel tag, all of your feed content goes inside these tags.
Step 3: RSS Feed Information
Next you place information about your RSS feed such as the title of it, the description, and a link to the the site.
<title>The title of my RSS 2.0 Feed</title>
<link>http://www.example.com/</link>
<description>This is my rss 2 feed description</description>
<lastBuildDate>Mon, 12 Sep 2005 18:37:00 GMT</lastBuildDate>
<language>en-us</language>
The lastBuildDate should be the date and time that the feed was last changed. Dates in RSS feeds should comply to RFC 822. In CFML the DateFormat mask would be ddd, dd mmm yyyy and the TimeFormat would be HH:mm:ss. Dates should be offset to GMT. The lastBuildDate tag is not required but is highly recommended.
Step 4: RSS Items
Next we enumerate over each RSS item, each item has a title, link, and description, publication date, and guid.
Make sure you escape any characters that might cause your XML to invalidate, these characters include <, >, & - I like to enclose any content that may contain HTML inside a CDATA section.
Note: In CFML you can use the XmlFormat function to escape special characters in XML.
Step 5: Close Channel and RSS tags.
</channel>
</rss>
Step 6: Validate your feed
Validate your feed using FeedValidator.org.
Other things to take note of
• Content Type - See my post on content types for RSS feeds
• Encoding - You should include the encoding in your Content-Type HTTP header, and in the XML declaration.
• Styling - If you want to make your RSS feed look a little nicer you can CSS stylesheet for your RSS feed.
• Categories - It's a good idea to include category tags in your RSS feeds as well, these go inside the item tag. You can give an item multiple categories by adding a tag for each one.
I have just scratched the surface of what you can do with RSS feeds, so check out the RSS 2.0 Spec for more info.
Do you digg it?
Comments
Related Entries
*Originally published at Pete Freitag's Homepage
About the Author: Pete Freitag (http://www.petefreitag.com/) is a software engineer, and
web developer located in central new york. Pete specializes in the
HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete
published the ColdFusion MX Developers Cookbook with SAMs Publishing.
Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes
in Web Consulting, and Products for Web Developers.
|