I need to process types and their relationships in an XSD (find all concrete types descending from an abstract type etc) This page claims it is possible via JAXB: http://www.antonioshome.net/blog/2009/20091012-1.php but I am receiving an error with the xjc that comes with Java 6. The error is:
[ERROR] Element "{http://www.w3.org/2001/XMLSchema}annotation" shows up in more
than one properties.
line 248 of file:/C:/tmp/xsdProcessing/XMLSchema.xsd
[ERROR] The following location is relevant to the above error
line 242 of file:/C:/tmp/xsdProcessing/XMLSchema.xsd
I've seen references to the problem, but I have not seen any clear explanations for the source of the problem or the solution. So as of today, is it possible to use JAXB to work on the xml schema for xml schema? If not, what would be the alternative? How does JAXB process schemas to create Java objects?