我在plist文件(iOS)中存儲一些字典,隨後加密。 讀取文件內容和解密他們之後,我返回文件的XML內容的字符串:plist XML字符串到NSMutableDictionary
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>password</key>
<string>apassword</string>
<key>username</key>
<string>ausername</string>
</dict>
</plist>
我知道的方法:dictionaryWithContentsOfFile:(NSString *)
和dictionaryWithContentsOfFile:(NSURL *)
創建字典從這種類型的數據,但我驚訝沒有這樣的dictionaryWithXML:(NSString *)
寫這個數據到一個文件然後閱讀它的東西,我試圖避免,因爲它只是過度,是否有任何明顯的解決方法,我失蹤?
[解析的plist(NSString的)轉換成的NSDictionary](http://stackoverflow.com/questions/1072308/parse-plist-nsstring-into-nsdictionary) – ismail 2013-02-28 16:32:04