XML + XSD=>爪哇?

发布于 2024-09-30 15:51:25 字数 177 浏览 2 评论 0原文

我需要让上面的等式成立!

我有一个带有 XSD 模式的 XML 文件,我需要获取带有所需代码的 Java 类来解析 XML 文件并构造 java 对象。

我在这里询问一个标准(或事实上的 apache)实用程序来制作上述请求成真...

JAXB 可以实现这种情况吗?

谢谢。

I need to make the above equation comes true!

I have an XML file with its XSD schema, and I need to get the Java classes with the required code to parse the XML file and construct java objects..

I am asking here about a standard (or defacto like apache) utility to make the above request comes ture....

Is JAXB can make this happens?

Thanks.

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

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

发布评论

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

评论(2

水染的天色ゝ 2024-10-07 15:51:25

听起来你想要JAX-B,Java XML-to -对象绑定API。

Sounds like you want JAX-B, the Java XML-to-object binding API.

も让我眼熟你 2024-10-07 15:51:25

您需要一个库来将 xsd 编译为 Java 类型。 JAXB 和 XMLBeans 就是两个这样的库。

使用 XMLBeans,您可以运行一个简单的命令来生成 Java 类型:

scomp -out types.jar myschema.xsd

You need a library to compile the xsd into Java types. JAXB and XMLBeans are two such libraries.

With XMLBeans you can run a simple command to generate the Java types:

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