Re: "iTunes Music Library.xml" won't load with dictionaryWithContentsOfFile:
Re: "iTunes Music Library.xml" won't load with dictionaryWithContentsOfFile:
- Subject: Re: "iTunes Music Library.xml" won't load with dictionaryWithContentsOfFile:
- From: David Dengg <email@hidden>
- Date: Fri, 26 Aug 2011 07:37:11 +0200
Thanks I tried that but NSPropertyListSerialization just says the same thing: its a malformed plist.
I checked the file by hand and found one corrupt song. The "Name" and "Location" were just garbage strings. I deleted the entry and its fine now.
I send the customer the file without the malformed entry to replace hers. But the file gets written a lot so the malformed entry has to be somewhere else. I suggested searching for the entry and deleting it in iTunes. I hope that will prevent that entry form getting written again.
Thank you for your help.
Am 25.08.2011 um 08:22 schrieb Jens Alfke:
>
> On Aug 24, 2011, at 4:02 AM, David Dengg wrote:
>
>> NSDictionary * xmldict = [NSDictionary dictionaryWithContentsOfFile:libraryXML];
>
> Try loading it using NSPropertyListSerialization, which will return an NSError telling you what went wrong.
>
> —Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden