I have a file that contains an array of dictionaries. How can I read it back to use it as a regular array containing those dictionaries in my code?
<?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">
<array>
<dict>
<key>elem1</key>
<string>Hello world</string>
<key>elem2</key>
<string>This is some string</string>
</dict>
</array>
</plist>
This on is fairly simple actually. Thanks to H2CO3 for pointing to it.
Just use the [NSArray arrayWithContentsOfFile:] method.
So here’s what I’ve got: