Hi,
I am developing an application for iphone which needs to load some description to a UIWebView
. But text that loads into the UIWebView
shows some html tags like <p></p>
.Is there any way to remove these type of tags?
Thanks in advance
Hi,
I am developing an application for iphone which needs to load some description to a UIWebView
. But text that loads into the UIWebView
shows some html tags like <p></p>
.Is there any way to remove these type of tags?
Thanks in advance
This is the best answer and is exactly what you are looking for ...
Write the following script in the webView delegate method. ( UIWebviewdidfinishLoading)
NSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.textContent"];
I asked a similar question the other day and got some good responses. I imagine one of these could suit your needs.
Hope it is helpful!