开发者

Problem parsing Google weather data only for Paris

I have created an app for weather reports by using this http://www.google.com/ig/api?weather=paris. It works well for all cities except Paris.

In my app I have a text field; if I type开发者_JS百科 "Sydney", it will show the weather in Sydney, but if I type "Paris", it gives an error: NSXMLParserErrorDomain error:9. I don't know what it means. What could be the error? Any idea?


According to Apple's documentation it has encountered an illegal character: NSXMLParserInvalidCharacterError = 9,

Make sure you correctly parse this as UTF-8


It seems that XML you are parsing contains some UTF-8 characters, but XML does not have proper XML declaration for UTF-8.

Make sure you configure your parser correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜