Atom "feed/entry/link" Element

Q

What is the Atom "feed/entry/link" element? How To Generate a "feed/entry/link" element?

✍: FYIcenter.com

A

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/RSS/. you should generate the link element for this feed entry like this:

 <link rel="alternate" href="http://dev.fyicenter.com/RSS/"/>

 

Atom "feed/entry/title" Element

Atom "feed/entry" Element

Atom Specification - RFC 4287

⇑⇑ RSS FAQ and Tutorials

2017-11-29, 1236🔥, 0💬