RSS Document Structure

Q

What Is the RSS Document Structure?

✍: FYIcenter.com

A

An RSS 2.0 Document is an XML document with the following structure:

<rss version="2.0">
   <channel>
      <title>...</title>
      <link>...</link>
      <description>...</description>
      ...
      <item>
         <title>...</title>
         <link>...</link>
         <description>...</description>
         ...
      </item>
      <item>
            ...
      </item>
        ...
   </channel>
</rss>

As you can see, an RSS XML document can be described as:

  • An RSS XML document has root element called "rss".
  • The "rss" root element contains a single "channel" element describing the producer of this RSS feed.
  • The "channel" element requires 3 sub elements: "title", "link", and "description".
  • The "channel" element may have other optional sub elements like: "language", "copyright", etc.
  • The "channel" element may have any number of "item" sub elements, providing a list of items of this RSS feed.
  • The "item" element may have "title", "link" and "description" as optional sub elements. But at least "title" or "description" must be provided.
  • The "item" element may have other optional sub elements like: "author", "category", etc.

 

RSS "channel" Element

RSS specifications

RSS specifications

⇑⇑ RSS FAQ and Tutorials

2017-11-11, 1442🔥, 0💬