Streaming SAX XML Processing on iPhone
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.
精彩评论