XML RSS
Syndicating content with RSS feeds
📡 What is RSS?
RSS (Really Simple Syndication) is an XML format for distributing web content. It allows users to subscribe to websites and receive automatic updates about new content like blog posts and news articles.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>My Blog</title>
<link>https://myblog.com</link>
</channel>
</rss>
RSS Feed Components
Channel
Container for feed information
<channel>
<title>Feed Title</title>
<description>About feed</description>
</channel>
Item
Individual content entries
<item>
<title>Article Title</title>
<link>https://url.com</link>
</item>
PubDate
Publication date and time
<pubDate>
Mon, 15 Jan 2024 10:00:00 GMT
</pubDate>
Enclosure
Attach media files to items
<enclosure
url="audio.mp3"
type="audio/mpeg"/>
🔹 Complete RSS Feed Example
RSS feeds follow a standard XML structure with channel and item elements. The channel contains metadata about the feed, while items represent individual content pieces like blog posts or news articles.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Tech News Daily</title>
<link>https://technews.com</link>
<description>Latest technology news and updates</description>
<language>en-us</language>
<item>
<title>New AI Breakthrough</title>
<link>https://technews.com/ai-breakthrough</link>
<description>Scientists achieve major AI milestone</description>
<pubDate>Mon, 15 Jan 2024 10:00:00 GMT</pubDate>
<author>[email protected]</author>
</item>
<item>
<title>Quantum Computing Update</title>
<link>https://technews.com/quantum</link>
<description>New quantum processor announced</description>
<pubDate>Sun, 14 Jan 2024 15:30:00 GMT</pubDate>
</item>
</channel>
</rss>
Feed Structure:
Latest technology news and updates
Scientists achieve major AI milestone
Mon, 15 Jan 2024 10:00:00 GMT
New quantum processor announced
Sun, 14 Jan 2024 15:30:00 GMT
🔹 RSS Channel Elements
Channel elements provide essential information about your RSS feed:
<channel>
<!-- Required Elements -->
<title>My Awesome Blog</title>
<link>https://myawesomeblog.com</link>
<description>A blog about web development</description>
<!-- Optional Elements -->
<language>en-us</language>
<copyright>Copyright 2024 My Blog</copyright>
<managingEditor>[email protected]</managingEditor>
<webMaster>[email protected]</webMaster>
<category>Technology</category>
<!-- Feed Image -->
<image>
<url>https://myblog.com/logo.png</url>
<title>My Blog Logo</title>
<link>https://myblog.com</link>
</image>
</channel>
Key Channel Elements:
- title: Name of your feed
- link: URL to your website
- description: Brief description of content
- language: Language code (e.g., en-us)
- image: Logo or icon for the feed