问题
I have a set of XSD Schemas , that are present in a directory structure . I am using JAXB to convert it into Java Classes . Now when converting it it breaks the schema into several classes and puts them into the default package. I can override the default package but i would like to maintain the same directory structure of the XSD.

How do i maintain the directory structure ?
How do i ensure that each XSD corresponds to a single java class?
Since myultimate goal is to convert the xsd to JSON Schema , am I doing it all wrong ?
should i take a different approach like converting XSD to JSON and then may be manipulating it to become JSON Schema ?
回答1:
Try using proper namespace in XSDs, it will create the class structure accordingly.
if namespace is http://www.company.com/XML/schema/product1
then the classes would be generated in com.company.xml.schema.product1.xxxx
来源:https://stackoverflow.com/questions/8063811/maintain-directory-hierarchy-when-converting-from-xsd-to-java-class