Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't open hand coded plist file

I have an Excel file with about 60 rows and 4 columns to convert into a test.plist file. I wrote a csv2xml parser and generated the plist but XCode refuses to recognize it when I added test.plist to the project. Double-clicking on the file inside XCode reveals this error:

The document test.plist cannot be opened.  Conversion of string failed.  The string is empty.

I even used the XCode Property Editor to generate a comparable plist with one record and diff'ed them, and don't really see any issue.

Here is my plist. The indentations are tab ("\t"), the eol is "\n". Help please! I am stuck.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="1.0">
<array>
    <dict>
            <key>Field1</key>
            <string>3/20/10</string>
            <key>Field2</key>
            <string>ValueOfField2</string>
            <key>Field3</key>
            <string>ABC 40</string>
            <key>Field4</key>
            <string>&quot;On March 20 1:30 UTC, this will happen.  &quot;</string>
    </dict>
</array>
</plist>
like image 974
twinkle Avatar asked Dec 02 '25 03:12

twinkle


1 Answers

You can run plutil -lint myTestFile.plist to see what the errors are.

like image 170
Dave DeLong Avatar answered Dec 04 '25 20:12

Dave DeLong



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!