Monday, November 03, 2003
RSS = NQSSS, Part 5
(Really Simple Syndication = Not Quite So Simple Syndication)
Another RSS Aha Moment: Using Escape Characters
While scouring the Net for more info on RSS I came upon an informative article by Stephen Downes titled "How to Create an RSS Feed With Notepad, a Web Server, and a Beer." In addition to enjoying Stephen's kindred wit (seemy Chicken Soup blog where I suggest a highball), I finally found the missing ingredient for polishing up my RSS feed.
Here is a pertinant excerpt from Stephen's article:
Even though my RSS file was validating fine, it wasn't until I started looking at the feed through a news aggregator (in this case I used Bloglines.com) that I even noticed that all of my apostrophes were coming out as weird characters. The validator belched on the ampersands, but didn't let out a wimper about the apostrophes.
There are more Escape Characters used in HTML than Stephen's article covers, but the characters he discusses are certainly the most prevelant. For a list of other escape characters, see the Breaking Par Web page on the topic.
Now I am a regular "escape" artist.
e-mail this writer
Another RSS Aha Moment: Using Escape Characters
While scouring the Net for more info on RSS I came upon an informative article by Stephen Downes titled "How to Create an RSS Feed With Notepad, a Web Server, and a Beer." In addition to enjoying Stephen's kindred wit (seemy Chicken Soup blog where I suggest a highball), I finally found the missing ingredient for polishing up my RSS feed.
Here is a pertinant excerpt from Stephen's article:
- An RSS file is an XML file. Some characters are illegal in XML. So you have to 'escape' them, that is, insert a text string in their place. Here is the list I use (not all of these are strictly required, but using this full list ensures maximum safety).
Ampersands - replace all ampersands with the following: & - Don't forget the URL! Many URLs have ampersands in them.
Quotation Marks - change every quotation mark to " - For example: He shouted, "Fire!" becomes, He shouted, "Fire!"
Apostrophes - change every apostrophe to ' - For example: It's his bike. becomes It's his bike.
Greater Than - change every 'greater than' character to > - but DO NOT change them in the tags. - For example, <description> I am > three feet tall</description> becomes <description>I am > three feet tall</description>
Less Than - change every 'less than' character tag to < - but DO NOT change them in the tags - For example: "<description>I have < five dollars</description> becomes <description>I had < five dollars</description>
Even though my RSS file was validating fine, it wasn't until I started looking at the feed through a news aggregator (in this case I used Bloglines.com) that I even noticed that all of my apostrophes were coming out as weird characters. The validator belched on the ampersands, but didn't let out a wimper about the apostrophes.
There are more Escape Characters used in HTML than Stephen's article covers, but the characters he discusses are certainly the most prevelant. For a list of other escape characters, see the Breaking Par Web page on the topic.
Now I am a regular "escape" artist.
- NOTE: For my other posts on the subject of RSS, see the following:
- RSS = NQSSS, Part 1 (9-28-03, When "Simple" is a bit of a Misnomer)
- RSS = NQSSS, Part 2 (9-30-03, More on the Adventures of Blog Syndication)
- RSS = NQSSS, Part 3 (10-04-03, News Aggravators, um, I Mean Aggregators)
- RSS = NQSSS, Part 4 (10-29-03, Why You Should Try Validating Your RSS File on a Regular Basis)
- RSS = NQSSS, Part 6 (11-05-03, Seven RSS Resources You Shouldn't Miss)
e-mail this writer