RSS Aggregator
The RSS Aggregator is a Java program designed to read and process XML-based RSS (version 2.0) feeds from a list of URLs. The program generates an HTML index file with links to individual feed summaries, which display publication dates, sources, and titles or descriptions of news items. Each feed summary is saved as a separate HTML file.
Features
RSS Parsing: Reads and processes RSS feeds in XML format (version 2.0). HTML Generation: Creates an index file linking to feed summaries, each containing news item details. Error Handling: Handles missing feed elements gracefully and outputs errors for invalid feeds. Scalable Output: Automatically generates a new HTML file for each feed in the list. Key Components
Classes and Methods outputHeader: Generates the opening tags for the HTML feed summary file, including channel metadata. outputFooter: Closes the HTML tags for a feed summary file. processItem: Parses individual news items and creates table rows with publication dates, sources, and titles/descriptions. getChildElement: Retrieves the first occurrence of a specified tag among XMLTree children. getChildContent: Extracts the text content of a specified tag from an XMLTree. processFeed: Processes an RSS feed, generates its HTML summary, and links it to the index file. Requirements
Java Development Kit (JDK): Version 8 or later. Components Libraries: Download from OSU Components Libraries: components.simplereader.SimpleReader components.simplereader.SimpleReader1L components.simplewriter.SimpleWriter components.simplewriter.SimpleWriter1L components.xmltree.XMLTree components.xmltree.XMLTree1 xample Usage
Input: XML file feeds.xml:
Result: index.html: Links to individual feed summaries. feed0.html, feed1.html: Summaries of RSS feeds, including publication dates, sources, and news titles/descriptions.