XmlPullParserException on ICS only

My problem is that I have to analyze data HTMLsuch as

84 101 <br>some text<br><table border='1'>Here comes a table definition</table>

and the XmlPullParserExceptionfollowing is thrown:

while (eventType != XmlPullParser.END_DOCUMENT) {
    if (eventType == XmlPullParser.START_TAG) {
        // do something
    } else if (eventType == XmlPullParser.END_TAG) {
        // do something else 
    }

    eventType = xpp.next(); // the XmlPullParserException is thrown here, on method next()
}

And a very interesting and strange part: an exception is generated only on Nexus S (OS version 4.0.4), on devices with a lower version of the OS this method works well.

The error message is as follows:

org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT 84 101 @1:8 in java.io.StringReader@414e3248)

Can someone explain to me why this only happens on ICS? Thank.

+5
source share
2 answers

1) Character encoding: do you use different encodings with Nexus S? Is your file decoded in ANSI or utf? Compare this with the Nexus S encoding.

2) Charset: XML . , - ? Nexus S?

, .

0

CDATA html

Everything inside a CDATA section is ignored by the parser.

A CDATA section starts with "<![CDATA[" and ends with "]] > "

0

All Articles