What is the difference between XML Pull Parser and SAX Parser

I am looking for the main difference between SAX and Pull Parser. I know that the SAX parser is good for processing a large XML file, since it does not store XML and does not move in only one direction. compared to the DOM. But I can not find the main difference between SAX and PULL. Please offer me any link

+4
source share
2 answers

The difference is how you code your XML processor. For the SAX parser, you are using an event-driven model in which you provide a class that has methods for responding to events that occur while reading XML ( Oracle tutorial here ).

For parsing, you get more control when the XML bit is read, and you can pass the parser to different classes to process different bits of the document ( Oracle tutorial here ).

A comparison of Oracle technologies can be found here .

+2
source

When Parser calls your handler, that is, Parser pushes the event into your handler, it is called Push Model Parser, for example. Sax parser

SAX Parser →

push- , .

Handler , Pull Parser. Handler "" XML- . . StAX

→ StAX Parser

, , http://tutorials.jenkov.com/java-xml/sax-vs-stax.html

+1