【发布时间】:2014-04-12 03:49:10
【问题描述】:
引用这个thread 我使用相同的 SAXParser 代码,我试图解析这个 xml 文档:
<doc>
<str name="id">743</str>
<str name="full_message_t">[ST] Needy has help with S&CC; cost-cutting being implemented http://t.co/Ta7Kgc3f3L</str>
<str name="source_t">ST</str>
<str name="news_t">Needy has help with S&CC; cost-cutting being implemented </str>
<str name="link_t">http://t.co/Ta7Kgc3f3L</str>
<long name="_version_">1464787947397054464</long>
</doc>
我收到了这个错误
org.xml.sax.SAXParseException; lineNumber: 1667; columnNumber: 62; The entity "CC" was referenced, but not declared.
如果我没记错的话。 &CC 是版权符号的 ASCII,我认为解析器无法读取它。那么我可以知道这是什么解决方案吗? 此外,我认为可能还有更多这些符号。解析器是否有某种导入或迂回方法能够读取所有符号?
【问题讨论】: