android xml 解析汉字只出来一个字的问题
摘要:
DocumentBuilderFactoryfactory=DocumentBuilderFactory.newInstance();//实例化DocumentBuilderfactory.setCoalescing(true);//这个防止汉字被解码成1个汉字DocumentBuilderbuilder=factory.newDocumentBuilder();当没有使用factory.setCoalescing(true); 这个句子的时候,只能解析出1个汉字。根据官方资料显示,是xml标准规定的,当字符为非ASCII字符的时候默认会解析成多个元素。Coalescing的意思是合并,也就是 阅读全文
posted @ 2013-08-14 08:18 stevenlaz 阅读(417) 评论(1) 推荐(0) 编辑