开发者

Cocoa Touch: parsing XML, should I use NSXMLParser or a Dom parser?

I need to parse a XML file storing events. I just need to process eve开发者_开发知识库nts with ending date later than actual date, so no many of them will used in the app.

The application will need to sort then before displaying, and then the user will resort and filter the results in a UITableView.

By now I just parse the data with NSXMLParser and load it into a NSMutableArray of Events. Then I can reorder the array or select a subset of it to acomadate to user needs.

What are the benefits of using a Dom parser and building an in-memory representation of the document? how is this representation implemented? is the sorting and filtering faster? does it save memory? can it be configured so only events with some condition are parsed? can it be configured to include needed elements from each event and not all of them?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜