On Mar 23, 2011, at 8:13 PM, Siegfried wrote: > Hello, > > I need to create an export / import system for my app, and just thought that > asking the list for some advices could help a lot. > > The CoreData database I have is fairly simple. No relationships, only 3 > entities with no more than 4 properties each: numbers and strings. So I think > exporting this as XML is the more appropriate solution. Also, it would allow > users make changes in the file easily. > > Are there any serious drawbacks from using this method? Or may a better > solution? What worries me most is the XML validation. It's not a high > priority, but having an at least decent XML is worthwhile. The big question: > A header saying XML version 1.0 is enough? Or do I need to create a DTD? > > Also, now on the mechanics, I think creating a mutable string and go > appending parts of the XML in a loop is adequate for this task, and using > NSXMLParser to parse it back should work. Indeed, the file will not be that > big (usually a few hundreds of KBs, really extremes cases are 1 or 2MB). > Well, at least I'm not aware of a framework to export / import CoreData, I > don't even think it is possible. > > Any "yes" or "no" on my ideas are really appreciated. > > Thanks, > > Best wishes, > > Siegfried
How about using a property list file instead? Easier to import and export, and can be edited with tools such as Property List Editor, though your users might not know how to use it, or even have it. WT_______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
