我正在用 Jsoup 解析 XMLPullParser
<title>(??????) [????]0 BLACK LAGOON -???? · ????- ?01-09?</title>
<guid isPermaLink='true'>http://fenopy.eu/torrent/+black+lagoon+A+01+09+/OTcyOTA3Mw</guid>
<pubDate>Wed, 27 Feb 2013 11:00:04 GMT</pubDate>
<category>Anime</category>
<link>http://fenopy.eu/torrent/+black+lagoon+A+01+09+/OTcyOTA3Mw</link>
<enclosure url="http://fenopy.eu/torrent/-BLACK-LAGOON-01-09-/OTcyOTA3Mw==/download.torrent" length="569296173" type="application/x-bittorrent" />
<description><![CDATA[ Category: Anime<br/>Size: 542.9 MB<br/>Ratio: 0 seeds, 3 leechers<br/> ]]></description>
</item>
这是我的解析代码
int eventType = -1;
while (eventType != XmlPullParser.END_DOCUMENT) {
switch (eventType) {
// at start of document: START_DOCUMENT
case XmlPullParser.START_DOCUMENT:
break;
// at start of a tag: START_TAG
case XmlPullParser.START_TAG:
// get tag name
String tagName = parser.getName();
if (tagName.equalsIgnoreCase(TAG_TITLE))
String t = parser.nextText();
当我调用下一个文本并引发以下异常时..
org.xmlpull.v1.XmlPullParserException: unresolved: · (position:TEXT (??????) [????] ...@36:59 in java.io.StringReader@40540698)
at org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
at org.kxml2.io.KXmlParser.error(KXmlParser.java:269)
at org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:818)
at org.kxml2.io.KXmlParser.pushText(KXmlParser.java:849)
at org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:1378)
at org.kxml2.io.KXmlParser.nextText(KXmlParser.java:1432)