使用 JAXB 是否需要架构?

发布于 2024-09-29 15:28:29 字数 91 浏览 1 评论 0原文

我有一个想要解组的 xml 文件。这是一个非常简单的文件,具有非常明确的结构。我还需要 xml 模式才能使用 JAXB 吗?如果是这样,其他选择是什么?有什么优点和缺点

I have an xml file which I want to unmarshal. It is a very simple file with very well defined structure. Do I still need a xml schema to use JAXB? If so what is the other option? What are the pros and cons

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

演多会厌 2024-10-06 15:28:29

不,不需要架构。如果这是一件简单的一次性事情,那么验证一次的开销可能不值得。由你决定。

No, a schema isn't required. If this is a simple one time thing then the overhead of validating against one may not be worth it. It's up to you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文