• 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
Re: CoreData: XML escaping and exporting to another persistent store format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: XML escaping and exporting to another persistent store format


  • Subject: Re: CoreData: XML escaping and exporting to another persistent store format
  • From: Jean Bovet <email@hidden>
  • Date: Thu, 14 Jul 2005 22:26:39 -0700


Forgive me, but surely it would be trivial to write and app to do check whether it does escape your strings. I tested with an app I had, and I input the string: "<key>" in a text field (so didn't do it programmatically, but have no reason to assume that the text field would change anything), and it saved it as: "&lt;key>".
So it does indeed escape entities. Though perhaps the documents should mention it, if they don't already. I would file an enhancement request against the documentation in that case.



In fact, I have some data stored in a SQLite store. If I choose the XML store type, I cannot re-open the file again (it says the file is corrupted and blabla). I was able to save to the XML store type by removing some data (some text comments with accented characters). So I was wondering why the XML file was not readable.... may be it is not an entity tag escaping problem but rather a string encoding problem ?



Is this a Document application? I would not consider saving it as an XML store as an "export" feature. I would just incorporate is as a choice for the user what format to use in order to save the information. And NSPersistentDocument does this automatically for you, if you specify both store types in info.plist.
I any case, I would guess you would need an XML persistent store of some kind. I haven't really looked into it, but I would expect NSPersistentDocument to have methods that can help you with this. Is it really more than 5-6 commands?
Any reason you are not allowing the user to use whatever store type they prefer?



It's not a document-based application. I would like to be able to create another file without using the "Save As" (because I want always to use SQL as the main format but give the opportunity to export the data in XML for backup purpose only). I was looking at the documentation and I found a method, migratePersistentStore, in NSPersistentStoreCoordinator to move a store from a type to another. The problem is that this method is apparently removing the original store from the coordinator - which I would like to avoid. So I don't know which way to take ;-)


Jean

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >CoreData: XML escaping and exporting to another persistent store format (From: Jean Bovet <email@hidden>)
 >Re: CoreData: XML escaping and exporting to another persistent store format (From: Charilaos Skiadas <email@hidden>)

  • Prev by Date: More Sync Services Framework Questions...
  • Next by Date: trapping NSTextView keys
  • Previous by thread: Re: CoreData: XML escaping and exporting to another persistent store format
  • Next by thread: Is it always necessary to lock around mutations of an NSMutableDictionary?
  • Index(es):
    • Date
    • Thread