Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-28-2009, 03:47 PM   #6 (permalink)
eddietr
Registered Member
 
Join Date: Apr 2009
Posts: 536
eddietr is on a distinguished road
Default

Well, when you first said that parseXMLFileAtUrl was a class method, I sort of assumed you had some reason for that in your design.

But I think maybe there wasn't a reason for that. Now that I've seen the implementation, it don't understand why you made that a class method at all. It looks to me like that should have been an instance method. But then again, I don't know your design. I only know what you've told us so far.

I can tell you this much: to parse XML with NSXMLParser, you have to create an instance (an object) of type NSXMLParser. And then you need to give that NSXMLParser object another object to use as its delegate.

So you can't give the NSXMLParser your MeetingXMLParser class. You have to give it an instance of that class. In other words, you have to give it a MeetingXMLParser object.

So you can do it like this:

1.) Create an instance of MeetingXMLParser (alloc/init)
2.) Call the instance method parseXMLFileAtUrl on that new instance.
3.) That instance method will create an NSXMLParser (your code does this already, except I don't know why you used NSClassFromString?)
4.) that instance method should set the delegate of the new NSXMLParser object to be your instance of MeetingXMLParser. (again your code sort of does this, but what you did doesn't make sense in a class method)
5.) Your instance of MeetingXMLParser will get all the delegate callbacks that NSXMLParser needs to parse the document.

I hope that makes sense?
eddietr is offline   Reply With Quote
 

» Advertisements
» Online Users: 630
18 members and 612 guests
ADY, AragornSG, doffing81, Droverson, esoteric, GHuebner, mraalex, RZApplications, sacha1996, SamorodovAlex, shaunteih58, SLIC, smithdale87, smithms, TheStalker, Touchmint, trisvandis, Xaphann
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,422
Threads: 94,018
Posts: 402,545
Top Poster: BrianSlick (7,978)
Welcome to our newest member, iAppDeveloper
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:19 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.