开发者

Streaming SAX XML Processing on iPhone

开发者 https://www.devze.com 2023-01-05 09:05 出处:网络
NSXMLParser allows SAX parsing of either an NSData block or from a URL source. The 开发者_运维问答problem is that both these methods require the entire XML source to be known before parsing begins.

NSXMLParser allows SAX parsing of either an NSData block or from a URL source.

The 开发者_运维问答problem is that both these methods require the entire XML source to be known before parsing begins.

Suppose I have a stream of XML Data (say a sequence of NSData objects) and I want to process the stream using NSXMLParser or another cocoa class, how can I do this without needing to have the whole document to begin with?


Look at Apple's XMLPerformance sample project, which uses libxml2 to perform streamed parsing.

0

精彩评论

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