Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stax Vs SAX Parsers  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Axis 2 uses Stax parser for parsing than SAX parser. Is Stax parser(Pull model) gives better performace than SAX parser(Push model) ?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I recall having read somewhere that this depends on the amount of data parsed and that someone even ended up using both parsers; one for moderate sizes and the other for large sizes. I would perform some testing to determine the behaviour of the different parsers for different amounts of data, with the kind of data for the application in question.
Best wishes!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The basic task of both parsers is identical so I would expect little difference.

Many people appear to find Stax conceptually easier to deal with.

One clear advantage of Stax occurs if you are scanning a document for one particular bit of information and dont need to scan the whole thing. It is easy to stop the Stax parser once you have found the item, with SAX you would have to throw an exception.

Bill
 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can i plug-in other than StAX parser in Axis 2 ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!