开发者

Plist contains the "&" character

开发者 https://www.devze.com 2023-01-16 19:22 出处:网络
I\'m having a .plist file which has some values with the "&" sign, for example "M&I". When I save the file to the document folder and load it from there, I\'m getting an em

I'm having a .plist file which has some values with the "&" sign, for example "M&I". When I save the file to the document folder and load it from there, I'm getting an empt开发者_如何转开发y dictionary. Any idea to how to fix this issue?


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

If you use CDATA sections instead, you don't have to escape the characters.


If you insert the values when open plist file as property list it would do it automatically.

0

精彩评论

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