iphone - Reusing NSXMLParser -
Writing in a class, I have to use NSXLL parsers twice to parse two different XML , I am thinking that which approach should be used? - Release the parser after terminating the parsing URL and resume the need to parse another URL? - Use different classes as a representative to parse another URL? - or something else?
Thanks peter
In my own personal experience, I usually have several different XML reactions had to be parsed and for each of them I am the successor of a base class and I create a square for each request / response / parse. Although IMHO does not have the clean code, I honestly find it impossible to write clear the code while dealing with a SAX-style parser.
If you do not want a group of others in your code, then my advice will be a separate call and maybe there will be separate classes. Now if XML is very similar, then this could be a different story ...
Comments
Post a Comment