I am trying to remove all HTML elements from a string. Unfortunately, I cannot use regular expressions because I am developing on the Blackberry platform and regular expressions are not yet supported.
Is there any other way to remove HTML from a string? I read somewhere that you can use the DOM Parser, but I could not find much on it.
HTML text:
<![CDATA[As a massive asteroid hurtles toward Earth, NASA head honcho Dan Truman (<a href="http://www.netflix.com/RoleDisplay/Billy_Bob_Thornton/20000303">Billy Bob Thornton</a>) hatches a plan to split the deadly rock in two before it annihilates the entire planet, calling on Harry Stamper (<a href="http://www.netflix.com/RoleDisplay/Bruce_Willis/99786">Bruce Willis</a>) -- the world finest oil driller -- to head up the mission. With time rapidly running out, Stamper assembles a crack team and blasts off into space to attempt the treacherous task. <a href="http://www.netflix.com/RoleDisplay/Ben_Affleck/20000016">Ben Affleck</a> and <a href="http://www.netflix.com/RoleDisplay/Liv_Tyler/162745">Liv Tyler</a> co-star.]]>
Text without HTML:
When a massive asteroid crashes toward Earth, NASA head Dan Truman (Billy Bob Thornton) brings out a plan to split a deadly stone in two before he destroys the entire planet, calling on Harry Stamper (Bruce Willis) - the worldβs best oil driller - to lead the mission. Over time, quickly ends, Stamper collects a team of cracks and explodes into space to try a treacherous task. Ben Effleck and Liv Tyler with the stars.
Thanks!
source share