문제

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?

도움이 되었습니까?

해결책

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

NSString *htmlStripped = [[NSAttributedString attributedStringWithHTML:DATA_FOR_MY_HTML options:nil] string];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top