I have a site (for example apple.com) which contain link tag, for example
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://images.apple.com/main/rss/hotnews/hotnews.rss" />
So how I can get title “RSS” and href from it?
Update 1:
I’ve tried to convert site into string using
NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apple.com/"]] returningResponse:NULL error:NULL];
NSString *HTMLWithFeeds = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
But I dont know what to do now…
Update 2:
It is not clear from my post, but in addition in should find at this site link with type=”application/rss+xml”
you might try using regular expressions
Apples documentation has some examples about how to further use and access the matches:
https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html
e.g. something like the following regex should do for the hrefs: