简体   繁体   中英

XML + XSD => Java?

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM