JAXB experiences the same basic problems as DOM-based parsing, which, generally speaking, the entire data data structure is stored in memory at the same time. However, it is generally less hungry than the DOM API (with the possible exception of the XOM).
Having said that, there are ways to use JAXB to read fragments of large documents in a streaming manner, if necessary. This is a rather exotic use.
source
share