in my app i am trying to parse an RSS feed url. Its working fine without any error. But now i am worried about the other rss feed types such as RDF and Autumn.
At first i dint have any idea about those feeds. Now the problem is, in my app when the user parses an RSS feed url it will work fine but if the user is parsing an RDF feed or Autumn feed i am sure that it will not get any content from those feeds, because the opening tags are different for all those feeds.
I am worrying that this will create problem in my app, how to overcome this problem…
I know that i should give the opening tags. I have a logical idea of using switch case for each tag that they related to RSS feed, RDF feed and so, but i dont know to implement it…
Please anyone help me…..
I presume you at some point in your handler do something like
and there you can surely just go
for each of the various opening tag names. That said, it seems neater to me, if you can get/know the feed type before parsing it, to just have different custom xml parsers for each (like RSSXMLHandler, RDFXMLHandler, etc) and use them like
That way, if one changes — eg, suppose the format of the RDF feed changes — you don’t have to worry about breaking the RSS/Autumn etc feed reading when updating it.