Generate Java classes from .XSD files...?

Keith Palmer Jr. picture Keith Palmer Jr. · Mar 26, 2009 · Viewed 298.3k times · Source

I have a gigantic QuickBooks SDK .XSD schema file which defines XML requests/responses that I can send/receive from QuickBooks.

I'd like to be able to easily generate Java classes from these .XSD files, which I could then use to marshal XML to Java objects, and Java objects to XML.

Is there an easy way to do this...?

Ideally, it would not require any libraries external to the basic Java distro at run-time. But I'm flexible...

Answer

basszero picture basszero · Mar 26, 2009

JAXB does EXACTLY what you want. It's built into the JRE/JDK starting at 1.6