I'm trying to loop through Atom feed entries, and get the title attribute lets say, I found this article, I tried this snipped of code :
for (final Iterator iter = feeds.getEntries.iterator();
iter.hasNext(); )
{
element = (Element)iter.next();
key = element.getAttributeValue("href");
if ((key != null) &&
(key.length() > 0))
{
marks.put(key, key);
}
//Don't have to put anything into map just syso title would be enough
}
But I get exception saying :
java.lang.ClassCastException: com.sun.syndication.feed.synd.SyndEntryImpl cannot be cast to org.jdom.Element at com.emir.altantbh.FeedReader.main(FeedReader.java:47)
What did I do wrong? can anyone direct me towards better tutorial or show me where did I make mistake, I need to loop through entries and extract title tag value. thank you