-3

I trying to parse this html string into String format, how can i do it?

<div class=\"timewrap nooffset\"><a href=\"https://ticketsbox.com/checkout/33352/\" onclick=\"ga('send','event','Время сеанса','imax','Абсолютно новые приключения Аладдина');newbrand(1006);tag_buy();\" target=\"_blank\" class=\"activeEvent\" rel=\"nofollow\">17:30</a></div>
Adil
  • 1
  • 1
  • 2
    have you tried anything so far? even search the google with same title? if so you can easily find https://stackoverflow.com/a/5409895/8809599 – Masoom Badi Mar 31 '19 at 13:22

1 Answers1

1

You can use method from:

android.text.Html

Html.fromHtml(String source, int flags);

Use it like that: Html.fromHtml(str, FROM_HTML_MODE_LEGACY);

returns a Spanned that may be converted to String with toString() method or set to textView as it is. textView.setText(CharSequence);

ronginat
  • 1,910
  • 1
  • 12
  • 23