Well Dear Sudhakar
the main deffenence between those two techniques in parsing XML documents are
the following:
1- if you are working on some critical performance issues like time and storage ,
you should go for the SAX,but why...
well , SAX Api depends on what i used to call afly parser, so the xml document you are going to parse did not loaded completely to the memory ,SAX parser garantee that the document is parsed step by step ,only one element at a time
is treated .and so on till there is no more elements in the documnet,and this
technique is so valuable if you are comunicating with some server configuration xml files ,and you need urgent event driven actions,not to drop all the document into your memory and begin parsing.
2-what Really DOM doing is that it forms what's called a Tree of Nodes to the whole parts of the xml documnet when it begin parsing , so you will add this tree to your memory and them DOM begins his work .
so that's it