Re: iPhone XML Parse
Fritz Anderson <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 1 Mar 2010, at 2:55 PM, Rui Lopes wrote: > All of these, go into the .m, correct? Yes, Objective-C source code goes into .m files. If you really are not clear on that point, you should start out on a simpler project that does not involve multiple delegate methods and a couple of layers of elements. > If I have an xml file with 3 companys, each with 6 factorys, and each factory with the attributs, how do I populate a table the companys, for example? The "Event-Driven XML Programming Guide for Cocoa" document that I referred you to has a chapter called "Handling XML Elements and Attributes." It shows you the proper approach, and the code there should be easy for you to adapt. The parser's delegate object needs instance variables to hold the current text, factory, and company, and to fill the next-level object with the current object when that is complete. I can't go into much detail, as you know better than I what your DTD is, and what are your needs for this "table" you're building. — F