问题
I have webservice response like this.
NSString *str= @"Slight <b>left</b> onto <b>Adelaide Rd/B509</b><div style="font-size:0.9em">Continue to follow Adelaide Rd</div>";
I have to convert html tags in the above str to plain text.Can u please suggest me solution for this.
回答1:
You can use NSScanner class to parse the HTML.
Have a look at this post: How to convert NSString HTML markup to plain text NSString?
来源:https://stackoverflow.com/questions/8959700/how-to-convert-html-tags-to-plain-text-in-iphone