XML Parsing displaying some wrong information
I am parsing xml files and getting response from the server however in my name tag there is one name La guérison . in the parsing delegate files of found character, name is break into two parts, first it give La gu and second time when开发者_如何学JAVA we append the rest of the string into La gu, it give output La gu\U00e9rison in console and we add the information into mutable array, would somebody let me know that how to get the correct information.
Sounds like you need to convert your source data into XML compatible format. I too have had exactly this problem with the & which is the bain of my life!
i.e. & needs to be changed to &
to be interpretted correctly my NSXMLParser.
I think there are three easy solutions 1) convert any invalid characters into their escape delimited/XML compatible values. (I believe NSString has such a method to do this if that's of help but I imagine you need to do this server side) 2) convert the entire thing into base64 string, makes it human unreadable but you can then specify the encoding settings of the text to reconvert it. 3) remove any offending characters and replace with plain ASCII text.
If you come up with a better solution I'd love to hear it too as I've had to go for #1. Hope this helps.
精彩评论