Study of XML Parsing Technique Based on StAX Iterator API

Mao Dong-kui · Modern Electronics Technique · 2008

Nowadays,DOM and SAX are used for XML data processing in most enterprises.The main disadvantage is that an entire tree structure of a XML document must be created in the memory before it can be navigated.Consumption of a huge memory is needed for processing a big XML document.The Shortcoming of SAX is that applications passively receive the generated events by a parser.As a result,browsing and dealing with specified parts of a XML document are impossible.StAX(Streaming API for XML) introduced by Java EE 5 gives a good answer.StAX has the same efficiency as SAX,as well as the same powerful function as DOM.The development background of StAX,a latest parsing technique for XML data.is covered.The parsing mechanics and technical meaning are analyzed.On this basis,an application example for parsing XML document is given,which uses the StAX API based on the iterator.The practice proves that StAX provided a typical and dual interface for XML,it is more similiar and efficiency than SAX and DOM.

Read the paper · More papers on PaperTik