开发者

string is not getting parsed correctly from XML

I am parsing an XML file, ion w开发者_开发知识库hich data is in "Portugese" language. data is getting parsed successfully but its not returnong the data as expected, Example=> I am parsing string "Próximo GP" and it is returning me "óximo GP". Its is trimming the first two letters. same problem I am having in other strings.

What should I do. Please help. Thanks-


This is by design. NSXMLParser does not guarantee that it will deliver the entire string contents of an element in one go. You are supposed to declare a mutable string to store the found characters in and append to this string when the parser:foundCharacters: method is called multiple times. Look at Apple's sample code, they do it like this everywhere.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜