Why should I choose SAX, rather than StAX?
Streaming xml-parsers like SAX and StAX are faster and more memory efficient than parsers building a tree-structure like DOM-parsers. SAX is a push parser, meaning that it's an instance of the observer pattern (also called listener pattern). SAX was there first, but then came StAX - a pull parser, meaning that it basically works like an iterator pattern. You can find reasons why to prefer StAX over SAX everywhere, but it usually boils down to: "it's easier to use". In the Java tutorial on JAXP StAX is vaguely presented as the middle between DOM and SAX: "it's easier than SAX and more efficient than DOM". However, I never found any clues that StAX would be slower or less memory efficient than SAX.

All this made me wonder. Are there any reasons to choose for SAX in stead of StAX?
Why should I choose SAX, rather than StAX?
===

Streaming xml-parsers like SAX and StAX are faster and more memory efficient than parsers building a tree-structure like DOM-parsers. SAX is a push parser, meaning that it's an instance of the observer pattern (also called listener pattern). SAX was there first, but then came StAX - a pull parser, meaning that it basically works like an iterator pattern. You can find reasons why to prefer StAX over SAX everywhere, but it usually boils down to: "it's easier to use". In the Java tutorial on JAXP StAX is vaguely presented as the middle between DOM and SAX: "it's easier than SAX and more efficient than DOM". However, I never found any clues that StAX would be slower or less memory efficient than SAX.

All this made me wonder. Are there any reasons to choose for SAX in stead of StAX?