I am storing some dictionaries in plist files (iOS), which are subsequently encrypted. After reading the file contents and decrypting them I am returning the xml contents of the file in a string:
<?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>
I am aware of the methods: dictionaryWithContentsOfFile:(NSString *)
and dictionaryWithContentsOfFile:(NSURL *)
to create a dictionary from this type of data but am surprised there is no such dictionaryWithXML:(NSString *)
Short of writing this data to a file then reading it, something I was trying to avoid as it is just excessive, are there any obvious workarounds I'm missing?