使用NSXMLParser解析时,是否下载整个.xml然后解析,还是进行流式解析? [英] When parsing with NSXMLParser, does it download the whole .xml then parse, or does it do a streaming parse?

查看:89
本文介绍了使用NSXMLParser解析时,是否下载整个.xml然后解析,还是进行流式解析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为iPhone编程。

使用NSXMLParser解析时,它是否下载整个.xml然后解析,还是进行流解析?基本上如果我中途解析解析,我是节省带宽,还是只是cpu周期?

When parsing with NSXMLParser, does it download the whole .xml then parse, or does it do a "streaming" parse? Essentially if I abort the parse halfway through, do I save bandwidth, or just cpu cycles?

推荐答案

NSXMLParser下载然后解析。如果您想在下载时解析,请查看 XMLPerformance 示例来自Apple的项目并实现了一个基于libxml的解析器。

NSXMLParser downloads then parses. If you want to parse while downloading, you should look at the XMLPerformance sample project from Apple and implement a libxml based parser.

这篇关于使用NSXMLParser解析时,是否下载整个.xml然后解析,还是进行流式解析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆