• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Exporting and Importing CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exporting and Importing CoreData


  • Subject: Exporting and Importing CoreData
  • From: Siegfried <email@hidden>
  • Date: Wed, 23 Mar 2011 20:13:17 -0300

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_______________________________________________

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

  • Follow-Ups:
    • Re: Exporting and Importing CoreData
      • From: Mike Abdullah <email@hidden>
    • Re: Exporting and Importing CoreData
      • From: BareFeetWare <email@hidden>
    • Re: Exporting and Importing CoreData
      • From: WT <email@hidden>
  • Prev by Date: Re: How hidden the Keyboard in a UIWebView
  • Next by Date: Problem with setAttributesOfItemAtPath:error:
  • Previous by thread: Re: CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.
  • Next by thread: Re: Exporting and Importing CoreData
  • Index(es):
    • Date
    • Thread