我正在从该文本&中检索来自Web服务器的文本。当我试图显示该数据时,符号就在那里在文本未显示之后(Handy& Harmon)“Android”文本显示“& Java”文本未显示,那么我该怎么做才能在文本视图中显示所有数据。这篇文章我从php服务器上重新开始
这下面来自php服务器的Html标签我正在使用saxparser从webserver中检索这些数据
-<Data><Price_type>Silver</Price_type>
<Prices>$39.80</Prices>
<Price_location>Handy & Harmon </Price_location></Data>
感谢。
答案 0 :(得分:1)
试试这个textview.setText(new String(strvar.getBytes(“ISO-8859-1”)));
答案 1 :(得分:0)
如果您可以使用CDATA访问包含特殊字符的Web服务器更改标记。例如:
<Data><Price_type>Silver</Price_type>
<Prices>$39.80</Prices>
<Price_location><![CDATA[Handy & Harmon]]></Price_location></Data>