views:

24

answers:

2

I have created a PLIST. The structure of the PLIST is like this

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://10.87.145.105:8080/copy/PropertyList-1.0.dtd"&gt;
<plist version="1.0">
    <dict>
        <key>title</key>
        <string>Sample</string>
        <key>title.short</key>
        <string>Sample1</string>
         </dict>
</plist>

This is not recognised in Mac/iPhone as a plist. If i remove that extra tab from and make both and in same indentdation it works in mac and iPhone. Is this indentation of and as shown below is mandatory for a MAc or iPhone to recognise the file.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://10.87.145.105:8080/copy/PropertyList-1.0.dtd"&gt;
<plist version="1.0">
<dict>
    <key>title</key>
    <string>Sample</string>
    <key>title.short</key>
    <string>Sample1</string>
</dict>
</plist>
+1  A: 

Just tried it and it makes no difference whatsoever - thought it shouldn't, and I was correct.

jrtc27
It's possible you just had the file type wrong in Xcode or something like that. (In Xcode, to change the file type, right -sorry- secondary click on the file, and choose 'Get Info'. Then, on the 'General' tab, there should be a file type drop-down box.)
jrtc27
I had created the PLIST with a unwanted extra tag that is why it was not accepted.
Chitti
A: 

No. Whitespace is optional in plist files.

Jonathan Grynspan