views:

68

answers:

1

How do I use NSXMLDetector to find RSS links in HTML files, the tags in the source are like so :

<link rel="alternate" type="application/rss+xml" title="CNN - Top Stories [RSS]" href="http://rss.cnn.com/rss/cnn_topstories.rss"&gt;

<link rel="alternate" type="application/rss+xml" title="CNN - Recent Stories [RSS]" href="http://rss.cnn.com/rss/cnn_latest.rss"&gt;

I need this in order to automatically detect RSS links in a RSS app. Thanks !

A: 

In both of your examples, the information you seek would be in the attributes dictionary given to your -parser:didStartElement:namespaceURI:qualifiedName:attributes: method.

Dave DeLong
How do I do that ?
Alexandre Cassagne
@Alexandre your `NSXMLParser` should have a `delegate` assigned to it, and this is one of your delegate methods.
Dave DeLong
Alexandre Cassagne: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html#//apple_ref/doc/uid/TP40002974-CH7-SW18
Peter Hosey
OK ThanksI wanna give you the reputation but it says the answer should be edited before answering. Can you just edit the answer like one letter so I can give the point?
Alexandre Cassagne