ios - how to change HTML value in UITextView -


i have description option in database , convert json format. after fetching database i'm displaying uitextview. it's showing below values.

<p>table : 1</p><p>table : 2</p><div><p>table : 3</p><div><p>table : 4</p><div><p>table : 5</p><div><p>table : 6</p><p>table : 7</p><p>table : 8</p><div>&nbsp;</div></div></div></div></div> 

html decode:

nsstring *decodestring = [self htmlentitydecode:productdescription]; txtt.text = decodestring;  

remove html tag html string

-(nsstring *) stringbystrippinghtml {   nsrange r;   nsstring *s = [[self copy] autorelease];   while ((r = [s rangeofstring:@"<[^>]+>" options:nsregularexpressionsearch]).location !=    nsnotfound)    s = [s stringbyreplacingcharactersinrange:r withstring:@""];   return s;   } 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -