We use the following code to read a RSS | ATOM feed, is there a way to find the RSS | ATOM URL of a blog feed give the blog site (e.g. for http://my.typepad.com or http://occupylosangeles.org/
). This should be similar to what google.com/reader does.
import com.sun.syndication.feed.atom.Feed;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.feed.synd.SyndCategory;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.fetcher.FeedFetcher;
import com.sun.syndication.fetcher.FetcherEvent;
import com.sun.syndication.fetcher.FetcherListener;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
FeedFetcher fetcher = new HttpURLFeedFetcher(feedInfoCache);
// register listener to feed
FetcherEventListenerImpl listener = new FetcherEventListenerImpl();
fetcher.addFetcherEventListener(listener);
// Mechanism to read feeds via Rome Fetcher
SyndFeed feed = fetcher.retrieveFeed(new URL(feedURL));