Pages

Tuesday, 29 October 2013

Difference between SAX parser and DOM parser ?

SAX Parser :
  • Sax is read only parser.
  • Sax follows event driven model.
  • Using Sax you can read the data sequentially.
  • Sax occupies very less memory because only one element information will be stored in the memory at a time.
DOM Parser :
  • Dom is read write parser.
  • Dom follows tree model.
  • Using Dom you can read the data randomly.
  • Dom occupies more memory because entire object graph and memory will be loaded in main memory at a time.

No comments:

Post a Comment