开发者

how to remove the html tag in iphone while parsing?

开发者 https://www.devze.com 2023-01-28 21:47 出处:网络
hai guys while parsing some of the html tags are add in the array i need to remove that tag example <img src=http://www.browndail开发者_运维技巧yherald.com/polopoly_fs/1.2421290!image/4027750474.

hai guys while parsing some of the html tags are add in the array i need to remove that tag

example

<img src=http://www.browndail开发者_运维技巧yherald.com/polopoly_fs/1.2421290!image/4027750474.jpg_gen/thumbnails/100x100/4027750474.jpg><br /><br><p>
Andrew Furnas '11 has been named a recipient of the Marshall Scholarship, a nationally competitive fellowship which sponsors two years of graduate study in the United Kingdom....</p>

i need to remove that <img> tag and display only the content

please help me


Store it in an NSSMutableString , then use the function deleteCharactersInRange to remove what you don't want.

You will need to decide what the range is by searching the NSMutableString.

All the solutions can be found easily on google.


You can use Three20Core to remove HTML tags.

 [yourString stringByRemovingHTMLTags];
0

精彩评论

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

关注公众号