I'm developing small application for iOs, and I have got a problem. My application uses restful API, using post requests and as response it receives XML. API has about 40 different methods, and problem is that I need to parse them all into objects. But, I want to implement all of the parsing in one class. I'm using NSXMLParser, an开发者_如何学运维d as far as I understand I must use different classes to use as a delegate for NSXMLParser. Is there a way to do it one class?
If you are developing a small project and you want to avoid headaches, the best way to parse XML files is using ElementParser, simple and easy to use parser with examples in its webpage. With it, you can set different callbacks for different elements in the XML, so you can do all the parsing work in one class.
Also note that is free of charge only for personal use, and you have to pay a license if you plan to use it with commercial purposes.
精彩评论