开发者

Sample of Program Downloading XML using NSXMLParser to CoreData

Any sample projects?

That say I can download or at least read

I think the basic should be check the entities, have a bunch of propert开发者_运维知识库ies indicating currentElement currentChildElement, and then add stuffs out. But I like to see sample code


I've created a project like this and I didn't find any sample projects or tutorials. In fact, I don't think I really stepped out of Apple's own docs for this one. The key is to break down the task into its basic components. So, going by your title of Program Downloading XML using NSXMLParser to CoreData, break that down into

  1. Downloading content—in this case a text file
  2. Parsing the downloaded content as XML with NSXMLParser
  3. Populating Core Data (hint: you do this while parsing)

There are tutorials out there, if not related questions and answers here in SO (I know for a fact I answered a question about how to use NSXMLParser), that will tell you how to do each of those things, but the particulars of how they work together quickly become specific to your project.

It looks as though you are on the right track with some of your comments, so I suggest you keep going down the path you are on and see how it goes. When you come up with a specific problem related to your project, then come back here and see where there is an answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜