views:

75

answers:

2

Should I use initWithURL or NSRequest to download an XML file when using NSXMLParser?

I'm downloading a feed and I'd like to get progress information for my download.

+1  A: 

Check out ASIHTTP as that is really good at handling this sort of thing....

http://allseeing-i.com/ASIHTTPRequest/

Lee Armstrong
This is looking good in my initial implementation. If this works, we have a winner.
Moshe
Yes! This is exciting!
Moshe
A: 

Just a sidenote. initWithUrl will download the file synchronously. If you want to parse the XML stream on-the-fly, here's an article (plus code) about that matter:

http://benreeves.co.uk/iphone-expat-xml-parser-wrapper/

The MYYN
Yea, I noticed the synchronous bit. You may have fixed some other issues too with this suggestion... I'll handle that soon and get back to you.
Moshe
Hey, @The MYYN - What files do I need to include to use iPhone Expat?
Moshe
Sorry, this isn't going to work for me. i couldn't figure out how to make the asynchronous part work.
Moshe