I need to extract the contents of the title tag from an HTML page displayed in a UIWebView. What is the most robust means of doing so?
I know I can do:
For those who just scroll down to find the answer:
- (void)webViewDidFinishLoad:(UIWebView *)webView{ NSString *theTitle=[webView stringByEvaluatingJavaScriptFromString:@"document.title"]; }
This will always work as there is no way to turn off Javascript in UIWebView.