This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
"Nothing is harder on your aurels than resting on them."<br />SCJP 1.4 89%,,SCJA 80%,SCWCD1.4 81%