JAVA parsing XML is usually in two ways, DOM and SAX. Although DOM is the standard of the consortium, provides a standard parsing method, but its parsing efficiency has been unsatisfactory, because when parsing XML using the DOM, the parser reads the entire document and constructs a tree structure (the node tree) that resides in memory, and then your code can manipulate the tree structure using the standard interface of the DOM. But most of the time we're only interested in part of the document, and it's very time-consuming to index some of the data we need from the root node of the node tree without parsing the entire document first.
Sax is an alternative method of XML parsing. Compared to the Document Object Model Dom,sax is a faster, lighter volume of reading and manipulating XML data
Method. SAX allows you to process a document when it is read, so that you do not have to wait for the entire document to be stored before taking action. It does not involve the overhead and conceptual jumps necessary for DOM. The SAX API is an event-based API that works with data flow, which processes data sequentially as data flows. The SAX API notifies you when a certain event occurs while parsing your document. When you respond to it, the data that you do not save will be discarded.
Sax parsing in the first part of JDK
Pending Update---------------
Network resources: http://www.iteye.com/topic/763895
Stax analysis in the second part of JDK