Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Web-Service :what are SAAJ and AXIOM

SAAJ is based on DOM, the Document Object Model. What is meant by this statement?

AXIOM is based on StAX, the Streaming API for XML. What is meant by this statement?

Which is better?

I want to clear the concept regarding to both APIs. Thank You

like image 893
Oomph Fortuity Avatar asked Jan 26 '26 23:01

Oomph Fortuity


2 Answers

The DOM model reads the entire document into memory before extracting things from the nodes. Stax parse the document without keeping it in memory.

So, need to reference backwards and forwards in the xml and the xml content is small, use DOM, otherwise consider Stax.

like image 65
Niels Bech Nielsen Avatar answered Jan 29 '26 13:01

Niels Bech Nielsen


Better is to AXIOM because of its StAX (won't use memory) usage.

like image 29
Hemanth Avatar answered Jan 29 '26 12:01

Hemanth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!