找到你要的答案

Q:Android SaxParser cannot parse nbsp;

Q:Android SAXParser无法解析nbsp;

I have been trying to fix this problem I am having with the SaxParser and an Atom Google Calendar feed. Basically the project that I am working on is pulling a Google Calendar feed from my college and placing it into a ListView, which when clicked opens up the entry in a new activity that displays all of the details of the Item the user selected. I believe that I've narrowed the problem down to a nbsp; being used in the atom feed. I have fixed similar processing issues with the title of each Item in the feed such as " and & with the String replaceAll method, but this has me stumped. The nbsp; is showing up as an Â(Circumflex A) used in many languages. It is not giving me an error and I guess if I cannot fix this the users could learn to live with it but it really bothers me that I cannot fix this. Stackoverflow is my last resort.

GIT: https://tylerjholmgren@bitbucket.org/tylerjholmgren/android-capstone-project.git

Above is the git location if you would like to take a look at my project. It will open in Android Studio/IntelliJ IDEA & Eclipse.

我一直在试图解决这个问题,我和SaxParser、原子谷歌日历饲料。基本上,我在项目上的工作是从我的大学和放置到一个ListView拉谷歌日历的饲料,当点击打开了进入一个新的活动,显示所有的细节,该项目的用户选择。我相信我已经把这个问题缩小到原子饲料中的一个问题了。我有固定的类似的处理问题在饲料如“每一项的标题和&;用字符串替换的方法,但这难住我了。的nbsp;展示了作为一个Â(旋)用多种语言。这不是给我一个错误,我猜如果我不能修复这个用户可以学会与它生活,但它真的困扰我,我不能修复这个。计算器是我最后的手段。

Git:https://tylerjholmgren@bitbucket.org/tylerjholmgren/android-capstone-project.git

以上是git的位置如果你愿意在我的项目一看。它会在Android的工作室/ IntelliJ IDEA和Eclipse的开放。

answer1: 回答1:

Use the numeric equivalent:

Find:  

Replace:  

References

  • W3C Spec-Prod

  • W3C XML Specification DTD

  • W3C XML Specification DTD: Characters and Symbols

  • Guide to the W3C XML Specification ("XMLspec") DTD, Version 2.1

使用数值等价:

查找:和;

替换:&;# 160;

工具书类

  • W3C规范生产

  • W3C的XML DTD规范

  • W3C的XML DTD规范: Characters and Symbols

  • 在W3C的XML规范指南(“xmlspec”)的DTD,版本2.1

android  sax  atom