thesmallest.com lessonettes: short essays on whatever |
|||||||||||
![]() |
• |
|
|||||||||
|
Solve your barcode solutions with great barcode scanners and top of the line barcode printers. Barcode hardware helps track inventory. |
||||
RSS Data Structure - A Simple Guide Start your first RSS channel by making a new plain text document. Use WordPad if you're a Windows user or TextEdit if you’re using a Mac. We’ll build this using the structure defined for RSS 0.91, one of the first established RSS formats. Although this is officially superceded by RSS 2.0, it is still popular, it works, and, as we've said, it is extremely simple and pretty clear. (NOTE: for serious RSS production I suggest looking at the RSS 2.0 or Atom specifications.) All RSS tags are proper ‘container’ items; an opening one and a closing one is wrapped around your data to define it, in classic XML style. Start by typing <rss version="0.91"> to make it clear to the RSS feed readers what format you’re using. This comes before anything else, and you’ll need a corresponding closing </rss> tag at the very end of your document. Inside this set you need the tag set which sets out a channel. This is, logically enough, done with <channel> and </channel>, Before you go any further, though, you need to give your channel a title, a home page-style URL link, and a description, using <title> and </title>, <link> and </link>, and <description> and </description>. Now your document should look something like this: <rss version="0.91"> <channel> <title>The Smallest test channel</title> <link>http://www.thesmallest.com/</link> <description>Example channel construction test</description> </channel> </rss> At this point you’re ready to start adding the items themselves after the channel’s own tag set. Like the channel construction we’ve just made, each item has its attendant title, link and description. Start by adding <item> and </item>, then putting the necessary elements within those parts. Here’s an example. <item> <title>New lessonette</title> <link>http://www.thesmallest.com/lessonettes/</link> <description>The Smallest publishes a new lesson</description> </item> There are limits to what you can fit into a channel .The text you use for the title should be less than 100 characters, for basic early-style RSS your description text should be under 500 characters, and you can have up to fifteen different item structure blocks in a single channel. If you try to cram in any more than that it may be cropped off in some reader displays. If your curiosity has been aroused you’ll find a well-written explanation of the optional elements in this and later revisions of RSS at blogs.law.harvard.edu/tech/rss and an overview of the topic at www.wikipedia.org/wiki/RSS. That’s it, you’ve just written your own RSS channel document. Save it using a web-safe name (i.e. no spaces or unusual characters) and make sure its suffix is .rss rather than .txt, then upload it to your web space using a regular FTP program such as CuteFTP. Now test it out in an RSS reader such as Safari RSS, PulpFiction, Jyte or Abilon, and add a link to it in the appropriate web page in your site so other people can find it. Always remember that an RSS reader program will present each item as a headline in your channel list. Clicking on an item’s title will show the description and let the reader click through to see whatever page URL you chose to supply as its link. People looking at your channel will expect the link supplied in an item to take them to something directly related to the item’s subject, generally a longer article giving further details. If your RSS feed behaves the way people expect they will be more likely to use it again in the future. Now you know all you need in order to put RSS to work, both for finding news and opinions in other channels and for publishing your own. |
RSS data structure |
|||||
![]() |
||||||
|
||||
|
||