Home >> FAQs/Tutorials >> RSS Tutorials >> Index

RSS FAQs - Atom Feed Introduction and File Generation

By: FYIcenter.com

Part:   1  2  3   4 

(Continued from previous part...)

Is There Any DTD File to Validate Atom Feed Files?

A DTD (Document Type Definitions) file contains a set of definitions of XML elements and attributes to form a new XML based language. The same DTD file can be used to validate XML files that comply with the new language.

Atom feed files are XML based, but there seems to be no DTD files exist to validate Atom feed files.

Is There Any XSD File to Validate Atom Feed Files?

A XSD (XML Schema Definition) file contains a set of definitions of XML elements and attributes to form a new XML based language. The same DTD file can be used to validate XML files that comply with the new language.

Atom feed files are XML based, but there seems to be no XSD files exist to validate Atom feed files.

How To Create Atom Feed Files?

Obviously, there are many ways to create Atom Feed files:

  • Using Atom on-line scrapers - On-line scrapers are on-line services that can analyze your Web pages and convert the result into Atom feed files automatically. All you need to do is to provide the URLs of your Web pages.
  • Using Atom off-line scrapers - Off-line scrapers are software tools that can analyze your Web pages and convert the result into Atom feed files automatically. All you need to do is to provide your Web page contents to scrapers.
  • Using Atom file editors - Creating Atom feed files by entering required data and let the editor to finish the XML elements for you. A good example of Atom file editor is Tristana Writer.
  • Using generic text editors - Creating Atom feed files by entering all the required XML elements yourself with generic editors, like UltraEdit or vi.
  • Using Atom file generation APIs - APIs (Application Programming Interfaces) are programming packages, modules or libraries that you can interact with in your own programs to perform predefined functions. Atom file generation APIs helps you to write your own programs to generate Atom files. For example, XML::Atom is Atom file generation API for Perl language.

How To Tell Visitors That You Have Atom Syndication Feeds?

There are several ways you can tell your visitors that you have Atom syndication feeds available on your Web site:

  • Showing your syndication feed URLs as hyper links with the Atom syndication icon.
  • Adding a <link> tag in your regular Web pages to allow browsers to show the RSS boomark icons.
  • Making your Atom feed file name to be "atom.xml" to allow browsers and search engines to auto discover feeds.

How To Tell Web Browsers That Your Web Pages Have Atom Feeds?

One way to tell Web browsers that your Web pages have Atom Feed files is to add a "link" tag in the header section of your Web pages. The "link" tag defines a "link" element with 4 attributes:

  • rel="alternate" - Defines the relation of this Web page and the Atom feed file.
  • type="application/atom+xml" - Defines the MIME type of the Atom feed file.
  • href="urlOfAtomFeedFile" - Defines the location of the Atom feed file.
  • title="titleOfTheFeed" - Defines the title of the Atom feed file.

The following Web page contains a "link" tag good example that associate an Atom feed to this page:

<html><head>
 <title>Webmaster FYI Center</title>
 <link rel="alternate" type="application/atom+xml" 
  href="atom.xml" title="Atom feed for FAQ pages">
</head><body>
<p>Definitions of Webmaster on the Web:</p>
<li>The person responsible for maintaining and 
    updating a Web site.</li>
<li>The administrator, maintainer and/or creater 
    of a web site.<li>
<li>The person who lays out the information trees, 
    designs the look, codes HTML pages, handles editing 
    and additions and checks that links are intact.</li>
<li>...</li>
</ul>
</body></html>

You need to name this file as "webmaster.html" and uploaded it to your Web site. You also need to upload the "atom.xml" created in previous tutorials. Now smart Web browsers should be able to know that "webmaster.html" has an Atom feed named as "atom.xml".

(Continued on next part...)

Part:   1  2  3   4 


Selected Developer Jobs:

More...