views:

38

answers:

1

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?

+4  A: 

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

Alex Reynolds