recognising rss feed

Posted on 2006-05-14
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 "" 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

    Solution one sounds better

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now