Muhammad Hewedy
Muhammad Hewedy

Reputation: 30058

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.

Upvotes: 4

Views: 677

Answers (2)

dogbane
dogbane

Reputation: 274612

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

Upvotes: 0

duffymo
duffymo

Reputation: 308763

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

Upvotes: 4

Related Questions