XML + XSD=>爪哇?
我需要让上面的等式成立!
我有一个带有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来你想要JAX-B,Java XML-to -对象绑定API。
Sounds like you want JAX-B, the Java XML-to-object binding API.
您需要一个库来将 xsd 编译为 Java 类型。 JAXB 和 XMLBeans 就是两个这样的库。
使用 XMLBeans,您可以运行一个简单的命令来生成 Java 类型:
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: