Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

RSS feeds with Java - Tutorial

Lars Vogel

Version 0.7

05.11.2009

Revision History
Revision 0.1-0.203.09.2007Lars Vogel
Created, rss feed creation with Stax
Revision 0.318.07.2009Lars Vogel
Re-structured article
Revision 0.422.07.2009Lars Vogel
change project name, links to XML article
Revision 0.524.07.2009Lars Vogel
used foreach loop
Revision 0.601.11.2009Lars Vogel
small re-write
Revision 0.705.11.2009Lars Vogel
Read RSS feed

RSS Feeds with Java

This article explains how to read and create RSS feeds with Java.

This article uses the Stax XML writer which is part of Java 6.0. Eclipse is used as the Java IDE.


Table of Contents

1. Overview
1.1. RSS - Really Simple Syndication
1.2. RSS with Java
2. Domain model
3. Read RSS Feeds with Stax
3.1. Create Project
3.2. Create the XML Reader
3.3. Test the code
4. Write RSS Feeds with Stax
4.1. Create Project
4.2.
4.3. Test the code
5. Thank you
6. Questions and Discussion
7. Links and Literature

1. Overview

1.1. RSS - Really Simple Syndication

An RSS document is a XML file which can be used to publish blog entries, news and / or audio and video files. The format of the XML file is specified via the RSS specification which is currently in version must be 2.0.

RSS stands for "Really Simple Syndication" (in version 2.0 of the RSS specification).

1.2. RSS with Java

As an RSS feed is a XML file we can use the Java XML parsers to read and create RSS feeds. The following will use the Java Stax XML parser.

For an introduction into XML and its usage with Java see Java XML Tutorial .