Question

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?

Était-ce utile?

La solution

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

NSString *htmlStripped = [[NSAttributedString attributedStringWithHTML:DATA_FOR_MY_HTML options:nil] string];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top