I use Hyperjaxb to generate some classes with JPA annotations from XML schemas. I'd like to specify which elements from given schema xjc should generate. I can't change xsd file. I can modify only bindings.开发者_开发问答xjb. I tried to use hj:ignored, but without success.
Well, hj:ignored
is the answer. It allows you to make Hyperjaxb ignore certain classes.
Here's an example:
<jaxb:bindings
node="xsd:complexType[@name='issue121Type']//xsd:element[@name='simpleCollection']">
<hj:ignored/>
</jaxb:bindings>
Customizations work in schema as well as via xjb
files.
See this project for instance.
How does "without success" reveal itself?
精彩评论