Transforming Core Data info into XML and vice versa
I have my application talking to a server. What I need to do is pull informa开发者_开发百科tion from the Core Data persistent store and parse it to XML, then send it to the server. The server will respond in XML and I will need to parse this back to Core Data.
What is the best way to do this? I'm aware of NSXMLParser
but unfortunately I haven't found any good tutorials on how to use it for my application.
Edit: There are so many better things than NSXMLParser now. Check SO for more answers.
As far as writing your data out as XML goes, you'll probably find this Stackoverflow Question helpful.
Sending the data back and forth can be done using an NSURLConnection
with a custom delegate.
Retrieving the data from the XML can be done using NSXMLParser
, like you said.
精彩评论