The problem occurs because the NSXMLParser class was changed between iOS 3.0 and 4.0. Originally it informally declared some delegate methods and this was turned into a formal delegate protocol: NSXMLParserDelegate.
This means that you'd need to fake the delegate class with:
if you're compiling for a iOS 3.0 target, but this will generate a duplicate @protocol declaration warning if you then compile for after 4.x. So, really you want the protocol declaration only for versions of iOS below 4.0.
The easiest way to do this is simply to wrap the protocol declaration with:
That's how you test for the current SDK version - in any particular sdk there's a #define for each version up until the current version, so version 4.1 has __IPHONE_
-cheers from julz