我找不到这个问题的答案,任何人都可以让我知道
I could not find answer for this question , could anybody please let me know
由于JAXB是更高级别的API,JAXB是否在内部使用SAX或DOM? / p>
Since JAXB is an higher level API , does JAXB uses SAX or DOM internally ?
推荐答案注意:我是 EclipseLink JAXB(MOXy) 领导和 JAXB 2(JSR-222) 专家组。
Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.
单个JAXB(JSR-222)实现可以自由选择用于不同输入的底层解析技术。我们在MOXy中使用的策略是使用StAX( javax.xml.stream )尽可能多。
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.
有多种方法可以控制JAXB impl使用的解析器。下面是我给出的答案的链接,解释了如何让JAXB impl使用特定的SAX解析器:
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:
- 如何使用JAXB2.0禁用DTD抓取
- How to disable DTD fetching using JAXB2.0
另一个答案解释如何确保使用StAX:
And another answer explaining how to ensure that StAX is used:
- 让JAXB走得更快
- Make JAXB go faster
更多推荐
JAXB是否在内部使用SAX或DOM?
发布评论