spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / xml / column13

Creating RSS files for your Web site

Technical Lead
Thomson Reuters (Markets) LLC
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?


Items

A channel may contain any number of <item>s, each of which links to a story, with an optional description:

<!ELEMENT item (title | link | description)*>
Required <item> sub-elements
<!ELEMENT title (#PCDATA)> the title of the story. Maximum length is 100.
<!ELEMENT link (#PCDATA)> the URL of the story. Maximum length is 500.
Optional <item> sub-elements
<!ELEMENT description (#PCDATA)> the story synopsis. Maximum length is 500.

Images

An <image> is a sub-element of <channel>, which contains three required and three optional sub-elements:

<!ELEMENT image (title | url | link | width? | height? | description?)*>
Required <image> sub-elements
<!ELEMENT url (#PCDATA)> the URL of a GIF, JPEG or PNG image that represents the channel. Maximum length is 500.
<!ELEMENT title (#PCDATA)> describes the image, it's used in the ALT attribute of the HTML <img> tag when the channel is rendered in HTML. Maximum length is 100.

<!ELEMENT link (#PCDATA)> the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image <title> and <link> should have the same value as the channel's <title> and <link>. Maximum length is 500.

Optional <image> sub-elements
<!ELEMENT width (#PCDATA)> the width of the image in pixels. Maximum value is 144, default value is 88.
<!ELEMENT height (#PCDATA)> the height of the image in pixels. Maximum value is 400, default value is 31.
<!ELEMENT description (#PCDATA)> contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.

Text Input

A channel may optionally contain a <textInput> sub-element, which contains four required sub-elements:

<!ELEMENT textinput (title | description | name | link)*>
Required <textinput> sub-elements
<!ELEMENT title (#PCDATA)> The label of the Submit button in the text input area. Maximum length is 100.
<!ELEMENT description (#PCDATA)> Explains the text input area. Maximum length is 500.
<!ELEMENT name (#PCDATA)> The name of the text object in the text input area. Maximum length is 20.
<!ELEMENT link (#PCDATA)> The URL of the CGI script that processes text input requests. Maximum length is 500.

Nota bene: RSS 0.91 places restrictions on the first non-whitespace characters of the data in <link> and <url> elements. The data in these elements must begin with http:// or ftp://. Among others, https:, file:, mailto:, news:, and javascript: are not permitted.

Let's look at a full-fledged example.

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business

Produced by Michael Claßen
All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/xml/column13/3.html
Created: Jun 18, 2000
Revised: Jun 18, 2000