Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 21
Registered: ‎01-24-2010
My Device: Bold 9700
My Carrier: Orange

Strip HTML tags from String, without Regular Expressions....

I am creating an application which downloads xml (an RSS feed) and I can parse the XML no problem, extracting the info I am interested in.


The problem is that occasionally, HTML ends up inside the element of RSS feeds, and so this shows up as plain text in my app (i.e. you can see things like full hyperlink tags in the text).


I know a straightforward solution is to use Regular Expressions, however these are not supported on the BlackBerry. My goal here is to remove the tags and just display the text.


Any suggestions?

Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Strip HTML tags from String, without Regular Expressions....

Have you looked at the StringPattern class in the net.rim.device.api.util package?

Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.