Plist contains the character "&"

I have a plist file that has some values ​​with the "&" parameter to sing, for example, M & I, when I save the file in the document folder and load it from them, I get an empty dictatorship, any idea how to fix this problem .

+6
objective-c iphone plist
source share
2 answers

If you directly modify the XML file, you must escape certain characters - & should be escaped using the XML entity & . If you use editors, this should be done automatically for you.

If you use CDATA , you do not need to exit the characters.

+16
source share

If you insert values ​​when opening the plist file as a list of properties, it will do this automatically.

0
source share

All Articles