Does JAXB uses SAX or DOM internally?

前端 未结 1 1155
北恋
北恋 2020-12-30 14:37

I could not find answer for this question , could anybody please let me know

Since JAXB is an higher level API , does JAXB uses SAX or DOM internally ?

相关标签:
1条回答
  • 2020-12-30 15:06

    Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.

    Individual JAXB (JSR-222) implementations are free to choose the underlying parsing technologies they use for different inputs. The strategy we use in MOXy is to use StAX (javax.xml.stream) as much as possible.

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

    • How to disable DTD fetching using JAXB2.0

    And another answer explaining how to ensure that StAX is used:

    • Make JAXB go faster
    0 讨论(0)
提交回复
热议问题