1

I'm trying to parse an XML file from the web.

I get the first few elements, and it's ok, but then on the Description one, the value contains Portuguese charecters, which throws the following error...

12-23 10:24:22.529: I/System.out(10924): XML Pasing Excpetion = org.apache.harmony.xml.ExpatParser$ParseException: At line 2, column 543: not well-formed (invalid token)

The error points to the " ó " charecter from the word "memórias" (memories). I was reading around here about changing the encode type but it doesn't seem to affect the values.

How can I bypass this? I have no control over the xml file by the way.

If you can and are willing to try: here's the link for the xml: http://feeds.feedburner.com/rc-cadernetadecromos?format=xml

1 Answer 1

1

Please see the below link I think it is help you...

http://www.anddev.org/novice-tutorials-f8/how-to-prase-xml-when-the-encoding-is-not-utf8-t7564.html

Sign up to request clarification or add additional context in comments.

1 Comment

OMG! I had everything I needed (the same as they state there). I changed my code from the tutorial, but I was still using the old object instead of the new one with encode type set to ISO-8859-1. Your comment helped me noticing my problem. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.