1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>RSS 2.0 [Universal Feed Parser]</title>
<link rel="stylesheet" href="feedparser.css" type="text/css">
<link rev="made" href="mailto:mark@diveintomark.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="annotated-examples.html" title="Annotated Examples">
<link rel="prev" href="annotated-atom03.html" title="Atom 0.3">
<link rel="next" href="annotated-rss20-dc.html" title="RSS 2.0 with Namespaces">
</head>
<body id="feedparser-org" class="docs">
<div class="z" id="intro"><div class="sectionInner"><div class="sectionInner2">
<div class="s" id="pageHeader">
<h1><a href="/"><span>Universal Feed Parser</span></a></h1>
<p><span>Parse RSS and Atom feeds in Python. 3000 unit tests. Open source.</span></p>
</div>
<div class="s" id="quickSummary"><ul>
<li class="li1">
<a href="http://sourceforge.net/projects/feedparser/"><span>Download</span></a> ·</li>
<li class="li2">
<a href="http://feedparser.org/docs/"><span>Documentation</span></a> ·</li>
<li class="li3">
<a href="http://feedparser.org/tests/"><span>Unit tests</span></a> ·</li>
<li class="li4"><a href="http://sourceforge.net/tracker/?func=browse&group_id=112328&atid=661937"><span>Report a bug</span></a></li>
</ul></div>
</div></div></div>
<div id="main"><div id="mainInner">
<p id="breadcrumb">You are here: <a href="index.html">Documentation</a> → <a href="annotated-examples.html">Annotated Examples</a> → <span class="thispage">RSS 2.0</span></p>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div><h2 class="title">
<a name="annotated.rss20" class="skip" href="#annotated.rss20" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> <acronym title="Rich Site Summary">RSS</acronym> 2.0</h2></div>
<div><div class="abstract">
<h3 class="title"></h3>
<p>This is a sample <acronym title="Rich Site Summary">RSS</acronym> 2.0 feed, annotated with links that show how each value can be accessed once the feed is parsed.</p>
</div></div>
</div>
<div></div>
</div>
<a name="id4964155"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>
<div class="example">
<a name="example.annotated.rss20" class="skip" href="#example.annotated.rss20" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Annotated <acronym title="Rich Site Summary">RSS</acronym> 2.0 feed</h3>
<pre class="programlisting "><?xml version="1.0" encoding="<a href="reference-encoding.html" title="encoding">utf-8</a>"?>
<rss version="<a href="reference-version.html" title="version">2.0</a>">
<channel>
<title><a href="reference-feed-title.html" title="feed.title">Sample Feed</a></title>
<description><a href="reference-feed-subtitle.html" title="feed.subtitle">For documentation &lt;em&gt;only&lt;/em&gt;</a></description>
<link><a href="reference-feed-link.html" title="feed.link">http://example.org/</a></link>
<language><a href="reference-feed-language.html" title="feed.language">en</a></language>
<copyright><a href="reference-feed-rights.html" title="feed.rights">Copyright 2004, Mark Pilgrim</a></copyright>
<managingEditor><a href="reference-feed-author.html" title="feed.author">editor@example.org</a></managingEditor>
<webMaster><a href="reference-feed-publisher.html" title="feed.publisher">webmaster@example.org</a></webMaster>
<pubDate><a href="reference-feed-updated.html" title="feed.updated">Sat, 07 Sep 2002 0:00:01 GMT</a></pubDate>
<category><a href="reference-feed-tags.html#reference.feed.tags.term" title="feed.tags[i].term">Examples</a></category>
<generator><a href="reference-feed-generator.html" title="feed.generator">Sample Toolkit</a></generator>
<docs><a href="reference-feed-docs.html" title="feed.docs">http://feedvalidator.org/docs/rss2.html</a></docs>
<cloud domain="<a href="reference-feed-cloud.html#reference.feed.cloud.domain" title="feed.cloud.domain">rpc.example.com</a>"
port="<a href="reference-feed-cloud.html#reference.feed.cloud.port" title="feed.cloud.port">80</a>"
path="<a href="reference-feed-cloud.html#reference.feed.cloud.path" title="feed.cloud.path">/RPC2</a>"
registerProcedure="<a href="reference-feed-cloud.html#reference.feed.cloud.registerProcedure" title="feed.cloud.registerProcedure">pingMe</a>"
protocol="<a href="reference-feed-cloud.html#reference.feed.cloud.protocol" title="feed.cloud.protocol">soap</a>"/>
<ttl><a href="reference-feed-ttl.html" title="feed.ttl">60</a></ttl>
<image>
<url><a href="reference-feed-image.html#reference.feed.image.href" title="feed.image.href">http://example.org/banner.png</a></url>
<title><a href="reference-feed-image.html#reference.feed.image.title" title="feed.image.title">Example banner</a></title>
<link><a href="reference-feed-image.html#reference.feed.image.link" title="feed.image.link">http://example.org/</a></link>
<width><a href="reference-feed-image.html#reference.feed.image.width" title="feed.image.width">80</a></width>
<height><a href="reference-feed-image.html#reference.feed.image.height" title="feed.image.height">15</a></height>
</image>
<textInput>
<title><a href="reference-feed-textinput.html#reference.feed.textinput.title" title="feed.textinput.title">Search</a></title>
<description><a href="reference-feed-textinput.html#reference.feed.textinput.description" title="feed.textinput.description">Search this site:</a></description>
<name><a href="reference-feed-textinput.html#reference.feed.textinput.name" title="feed.textinput.name">q</a></name>
<link><a href="reference-feed-textinput.html#reference.feed.textinput.link" title="feed.textinput.link">http://example.org/mt/mt-search.cgi</a></link>
</textInput>
<item>
<title><a href="reference-entry-title.html" title="entries[i].title">First item title</a></title>
<link><a href="reference-entry-link.html" title="entries[i].link">http://example.org/item/1</a></link>
<description>
<a href="reference-entry-summary.html" title="entries[i].summary"> Watch out for
&lt;span style="background: url(javascript:window.location='http://example.org/')"&gt;
nasty tricks&lt;/span&gt;</a>
</description>
<author><a href="reference-entry-author.html" title="entries[i].author">mark@example.org</a></author>
<category><a href="reference-entry-tags.html#reference.entry.tags.term" title="entries[i].tags[j].term">Miscellaneous</a></category>
<comments><a href="reference-entry-comments.html" title="entries[i].comments">http://example.org/comments/1</a></comments>
<enclosure url="<a href="reference-entry-enclosures.html#reference.entry.enclosures.href" title="entries[i].enclosures[j].href">http://example.org/audio/demo.mp3</a>" length="<a href="reference-entry-enclosures.html#reference.entry.enclosures.length" title="entries[i].enclosures[j].length">1069871</a>" type="<a href="reference-entry-enclosures.html#reference.entry.enclosures.type" title="entries[i].enclosures[j].type">audio/mpeg</a>"/>
<guid><a href="reference-entry-id.html" title="entries[i].id">http://example.org/guid/1</a></guid>
<pubDate><a href="reference-entry-updated.html" title="entries[i].updated">Thu, 05 Sep 2002 0:00:01 GMT</a></pubDate>
</item>
</channel>
</rss></pre>
</div>
</div>
<div style="float: left">← <a class="NavigationArrow" href="annotated-atom03.html">Atom 0.3</a>
</div>
<div style="text-align: right">
<a class="NavigationArrow" href="annotated-rss20-dc.html">RSS 2.0 with Namespaces</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright © 2004, 2005, 2006 Mark Pilgrim</p></div>
</div></div>
</body>
</html>
|