vadivelu
vadivelu

Reputation: 508

How to parse rss feed from iPhone?

I need to parse the rss feed from feed://feeds.huffingtonpost.com/huffingtonpost/LatestNews. But, I could not read Link tag of data because it doesn't have separate start and end tag.

<link id="apple-rss-icon" rel="icon" href="file://localhost/System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/Resources/favicon.tif" type="image/x-icon" />

I am using NSXMLParser class with following methods.

Upvotes: 1

Views: 1426

Answers (2)

HeikoG
HeikoG

Reputation: 1813

There are a couple of rss parser implementations available. E.g https://github.com/mwaterfall/MWFeedParser Maybe you can use this or get some inspiration from it.

Upvotes: 2

Matt Bishop
Matt Bishop

Reputation: 1007

Non-paired tags such as what you're showing will still fire NSXMLParser events and you can access the element's attributes inside the didStartElement method.

For an example of a pretty full-featured Objective-C RSS parser, check out MWFeedParser.

Upvotes: 2

Related Questions