JAXB是否在内部使用SAX或DOM?

编程入门 行业动态 更新时间:2024-10-24 08:19:04
本文介绍了JAXB是否在内部使用SAX或DOM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我找不到这个问题的答案,任何人都可以让我知道

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?

本文发布于:2023-11-25 15:43:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630352.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在内部   JAXB   DOM   SAX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!