There are tools for this, but I do not think that there is anything specific in Java. I would try running JAXB in the XML Schema (http://www.w3.org/2001/XMLSchema), which will generate Java classes that match the XSD constructs. You can then use them to read / write XML schemas and validate against XML Schema.
source
share