RSS Encoding Examples

Archivist's Note: This archived documentation applies to RSS 2.0.1 specification (revision 5) and RSS 2.0.1 specification (revision 6).

These are examples of item-level descriptions, illustrating how encoding works with and without the use of CDATA (a feature of XML 1.0).

Each example consists of two lines, the first is an example description element, the second line is what the reader will see when viewing the description in a RSS 2.0-compatible aggregator.

The examples were provided by Nick Bradbury of Bradbury Software.

Example 1: Encoding HTML Tags

<description>this is &lt;b&gt;bold&lt;/b&gt;</description>

Result: this is bold

Example 2: Encoding HTML within a CDATA Section

<description><![CDATA[this is <b>bold</b>]]></description>

Result: this is bold

Example 3: Encoding angle brackets in text

<description>5 &amp;lt; 8, ticker symbol&amp;lt;BIGCO&amp;gt;</description>

Result: 5 < 8, ticker symbol <BIGCO>

Example 4: Encoding angle brackets in text within a CDATA section

<description><![CDATA[5 &lt; 8, ticker symbol &lt;BIGCO&gt;]]></description>

Result: 5 < 8, ticker symbol <BIGCO>

Popular Pages on This Site