|
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...)
How To Write a Minimum Atom 1.0 Feed File?
If you want your Website to support a minimum Atom 1.0 feed, you can follow the tutorial exercise bellow.
1. First create a file called "atom.xml" with the following content:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Webmaster FYI Center</title>
<subtitle>A place to find information for Webmasters
</subtitle>
<link rel="self" href="http://dev.fyicenter.com/atom.xml"/>
<id>http://dev.fyicenter.com/</id>
<updated>2005-07-13T18:30:02Z</updated>
<author>
<name>FYIcenter.com</name>
<email>noreply@fyicenter.com</email>
</author>
<entry>
<title>Webmaster FAQ Collection</title>
<link href="http://dev.fyicenter.com/faq/"/>
<id>http://dev.fyicenter.com/faq/</id>
<updated>2005-07-13T18:30:02Z</updated>
<summary>A massive collection of FAQs for Webmasters.
</summary>
</entry>
</feed>
2. Relace domain name "fyicenter.com" with your domain name.
3. Upload "atom.xml" to your Website.
4. Your Website supports Atom 1.0 syndication feed now.
How To Validate an Atom 1.0 Feed File?
If you created an Atom feed file yourself, and want to know if the file meets the Atom 1.0 standards
or not, you can validate your feed file using the following methods:
How To Use w3.org Feed Validation Service?
w3.org feed validation service is provided at http://validator.w3.org/feed/.
It offers you two methods to validate your feed document:
- Validate by URL - Validating a feed file by entering the URL where the feed file is located.
- Validate by Direct Input - Validating a feed file by entering the content of the feed file.
But this method is not working at this time.
If you want to the w3.org feed validator, you can follow the tutorial exercise below:
1. Go to http://validator.w3.org/feed/.
2. Enter http://dev.fyicenter.com/atom.xml into the Address field and click the Check button
as shown in following picture:

3. You should see the validation result page with a "Congratulations" message.
What Happens If Your Atom Feed Fails the Validation?
If your Atom feed file fails the w3.org validator, you will get an error message explaining
where the error is in your feed file. The tutorial exercise below shows you a good example.
Try to validate the following Atom feed file:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Webmaster FYI Center</title>
<subtitle>A place to find information for Webmasters
</subtitle>
<link href="http://dev.fyicenter.com/atom.xml"/>
<id>http://dev.fyicenter.com/</id>
<updated>2005-07-13T18:30:02Z</updated>
<author>
<name>FYIcenter.com</name>
<email>noreply@fyicenter.com</email>
</author>
<entry>
<title>Webmaster FAQ Collection</title>
<link href="http://dev.fyicenter.com/faq/"/>
<id>http://dev.fyicenter.com/faq/</id>
<updated>2005-07-13T18:30:02Z</updated>
<summary>A massive collection of FAQs for Webmasters.
</summary>
</entry>
</feed>
You will get the following error message:
line 2, column 3: Missing atom:link with rel="self"
<feed xmlns="http://www.w3.org/2005/Atom">
Why? Because the feed link element is missing the rel="self" attribute.
(Continued on next part...)
Part:
1
2
3
4
|