I am parsing an XML file, ion which 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.
NSXMLParserdoes 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 theparser:foundCharacters:method is called multiple times. Look at Apple’s sample code, they do it like this everywhere.