1

In my application, I'm receiving an html file from a news server.

After receiving, I want to remove the tags, images, URL anchors, etc and just show the text in text view.

There's a website which functions similar to the one that I'm looking for. The website takes html as input and removes the tags and displays just plain text as result. I want to achieve similar function in my app and display only the text from the news received.

Any libraries or open source web services available for this?

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
Satyam
  • 15,493
  • 31
  • 131
  • 244

1 Answers1

3

There is this library here, you could do something like this:

NSString *htmlStripped = [[NSAttributedString attributedStringWithHTML:DATA_FOR_MY_HTML options:nil] string];
Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201