I am currently using XCODE 4.0.2 and am trying to create a very simple plist as shown here
I follow the instructions telling me to do the following!
it should end up looking like this
<?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>Name</key>
<string>John Doe</string>
<key>Phones</key>
<array>
<string>408-974-0000</string>
<string>503-333-5555</string>
</array>
</dict>
</plist>
however. when i do it, it ends up this
<?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>Root</Key>
<dict>
<key>Name</key>
<string>John Doe</string>
<key>Phones</key>
<array>
<string>408-974-0000</string>
<string>503-333-5555</string>
</array>
</dict>
</dict>
</plist>
is this a bug between 4.0.2 and 4.2 (or whatever the lastest version is?) what accounts for this difference?
Apple’s sample is wrong. The graphical view shows Root but the text view is a flattened version without the Root parent. Just don’t include the Root node when you create the list and you’ll end up with text that matches their listing.