开发者

RSS Detector in NSXMLParser

开发者 https://www.devze.com 2022-12-25 22:43 出处:网络
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:

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">

<link rel="alternate" type="application/rss+xml" title="CNN - Recent Stories [RSS]" href开发者_开发问答="http://rss.cnn.com/rss/cnn_latest.rss">

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号