I'm using the Jsoup.parse()
to remove html tags from a String. But my string as a word like <name>
also.
The problem is Jsoup.parse() remove that too. I'ts because that text has < and >. I can't just remove < and > from the text too. How can I do this.
String s1 = Jsoup.parse("<p>Hello World</p>").text();
//s1 is "Hello World". Correct
String s2 = Jsoup.parse("<name>").text();
//s2 is "". But it should be <name> because <name> is not a html tag
,,,,etc
– Ravindu Aug 03 '16 at 06:38