开发者

Remove HTML tags while reading XML data on Android

开发者 https://www.devze.com 2023-01-08 14:40 出处:网络
I am new to working on Android technology. I have to开发者_开发问答 read XML files in which there are HTML tags such as <b> so I have to remove these tags before I display them on screen. If you

I am new to working on Android technology. I have to开发者_开发问答 read XML files in which there are HTML tags such as <b> so I have to remove these tags before I display them on screen. If you know any way to remove these before display please help me.


if you need to strip all the html tags you use the String method replaceAll("<(.|\n)*?>","");


Find your answer here: How to strip or escape html tags in Android

In short Html.fromHtml(stringToEscape).toString()

0

精彩评论

暂无评论...
验证码 换一张
取 消