开发者

Android Text view not allow & nSymbol for dynamic text view

I am retrieving text from web server in that text & symbol is there when i try to display that data & after text is not displaying like (Handy & Harmon) "Android" text is displaying "& Java" text is not displaying so what should i do to display all data in my text view. This text i am retriving from php server

This below Html Tags from php server i am using saxparser to retrive this data from webserver

-<Data><Price_type>Silver</Price_type>
<Prices>$39.80</Prices>
<开发者_运维百科;Price_location>Handy & Harmon </Price_location></Data>

Thanks.


try this textview.setText(new String(strvar.getBytes("ISO-8859-1")));


If you have acces to the web server change tags containing special characters using CDATA. Example:

<Data><Price_type>Silver</Price_type>
<Prices>$39.80</Prices>
<Price_location><![CDATA[Handy & Harmon]]></Price_location></Data>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜