|
Home >> FAQs/Tutorials >> RSS Tutorials >> Index
RSS FAQs - Atom Feed File Structure and Elements
By: FYIcenter.com
Part:
1
2
3
4
5
(Continued from previous part...)
How To Generate a Feed Entry link Element?
The <link> element is not a required sub-element of the <entry> element.
But it is strongly recommended that you provide a link element with rel="alternate" for each of your
feed entries.
The rule for feed entry link element is simple. It needs two attributes:
- rel="alternate" - Indicating that this link is providing the URL of an alternate version of
the content of this feed entry.
- href="urlOfTheContent" - Specifying the URL of the content of this feed entry.
For example, if you have a feed document that contains a feed entry
to represent the most popular FAQ entry of the week. Of course, that most popular
entry is a Web page with a URL like http://dev.fyicenter.com/faq/rss.
you should generate the link element for this feed entry like this:
<link rel="alternate" href="http://dev.fyicenter.com/faq/rss"/>
How To Generate a Feed title Element?
The <title> element is a required sub-element of the <entry> element.
The title element should contain a short but human readable title of the feed entry.
You should follow the same rules on Web page title elements to generate your Atom feed entry title elements.
One strategy is to use the same title as the Web page that your Atom feed entry is based on.
For example, if one of your page is included as an entry in your Atom feed document,
and that page has a title called: "Atom Feed Introduction and File Generation".
Now you want to generate an Atom feed for that Web page. Obviously, you should the same title as
that page:
<title>Atom Feed Introduction and File Generation</title>
How To Generate a Feed summary Element?
The <summary> element is not a required sub-element of the <feed> element.
But it is strongly recommended that you provide a summary element for each of your
feed entries. You should follow the same rules on Web page description meta elements
to generate your Atom feed entry summary elements.
One strategy is to use the same value of the description meta element
as the Web page that your Atom feed entry is based on.
For example, if one your FAQ page is selected as a feed entry in Atom feed document,
That Web page has the following description meta element:
<meta name="description" content="A collection of
16 FAQs on Atom feed file standard. Clear answers are
provided with tutorial samples on introduction to Atom
feed file standard; various ways to generate Atom feeds;
linking Atom feeds to Web pages."/>
You should simply borrow value from the description meta element of that page
to generate feed entry summary element:
<summary>A collection of
16 FAQs on Atom feed file standard. Clear answers are
provided with tutorial samples on introduction to Atom
feed file standard; various ways to generate Atom feeds;
linking Atom feeds to Web pages.</summary>
Can One Atom Feed Document Have Multiple Entries?
Yes. One Atom feed document can have multiple entries. Here is a good example:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>The Most Popular FAQ Entries for Webmasters</title>
<subtitle>The top 3 popular
entries of this week on our comprehensive collection
of Webmaster FAQs.</subtitle>
<link rel="self"
href="http://dev.fyicenter.com/faq/top_3_atom.xml"/>
<id>http://dev.fyicenter.com/faq/top_3_atom.xml</id>
<updated>2005-07-13T18:30:02Z</updated>
<author>
<name>FYIcenter.com</name>
<email>noreply@fyicenter.com</email>
</author>
(Continued on next part...)
Part:
1
2
3
4
5
|