recognising rss feed

Posted on 2006-05-14
Medium Priority
Last Modified: 2010-03-31
   I am writing a program that will extract rss links from a given html file.
I have two solutions for doing this,
first solution, parse the html file, send a http request for each link it encounters to get the file, and then use "Informa" RSS open source library to determine if it is a valid RSS file.
second solution, for each link in the html file, check if it has file extension of a rss file, then mark it as a potential rss file. If it doesn't have a rss file extension, check if the link has the form "www.xxxx.com/feed/" where the bottom directory of the url is named "feed", then mark it as a potential rss file. If this link is a potential rss file, then send a http request to obtain the file, and then use "Informa" RSS open source library to determine if it is a valid RSS file.

As you can see, the second solution will be a lot faster since it doesn't require a http request to be sent for each link, but since RSS file extensions vary greatly, from xml to html to aspx. so from the look of this, it seems like every link will belong to this catagory, since most non rss feeds are with html file extension.
my problem now is, with second solution how do i check if the file is of rss file extension since there will be a huge varieties of file extension for rss file?

Hopefully you guys can understand my question
Question by:fungi8210
1 Comment
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 16677336
Solution one sounds better

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question