Monday 3 September 2012

Expat Parser

Expat is an parser which is used to read, update, create and manipulate XML data.
Types of XML parsers:
a) Tree based parser - This parser analyzes the whole document and provides tree elements after transforming a XML document. Document Object Model (DOM) is an example of Tree-based parser.
b) Event based parser - XML document views as a series of events. After occuring any event it calls a function to handle it. Expat parser is an exaple of event based parser.
Event based parser focus the content of any XML document not their structure. So this type of parser can access data faster than tree based parsers.