Does JAXB use SAX or DOM internally?

I could not find the answer to this question, can someone please let me know

Since JAXB is a higher level API, does JAXB use SAX or DOM internally?

+6
source share
1 answer

Note I am EclipseLink JAXB (MOXy) and a member of the JAXB 2 group (JSR-222) .

Individual JAXB implementations (JSR-222) are free to choose the basic analysis technologies that they use for different input data. The strategy we use at MOXy is to make the most of StAX ( javax.xml.stream ).

There are ways to control which parser your JAXB impl uses. Below is a link to the answer I gave, explaining how to get JAXB impl to use a specific SAX analyzer:

And another answer explaining how to ensure the use of StAX:

+10
source

Source: https://habr.com/ru/post/911926/


All Articles