Remove HTML Tags from an NSString on the iPhone

前端 未结 22 1644
心在旅途
心在旅途 2020-11-22 10:02

There are a couple of different ways to remove HTML tags from an NSString in Cocoa.

One way is to render the string into an

22条回答
  •  天命终不由人
    2020-11-22 10:20

    Take a look at NSXMLParser. It's a SAX-style parser. You should be able to use it to detect tags or other unwanted elements in the XML document and ignore them, capturing only pure text.

提交回复
热议问题