Akusete
Akusete

Reputation: 10794

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?

Upvotes: 2

Views: 593

Answers (1)

Alex Reynolds
Alex Reynolds

Reputation: 96976

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

Upvotes: 5

Related Questions