Ignoring some elements / classes in a JAXB binding

I use Hyperjaxb to create some classes with JPA annotations from XML schemas. I would like to indicate which elements from this xjc schema should generate. I can not modify the xsd file. I can only change bindings.xjb. I tried to use hj: ignored, but to no avail.

+5
source share
1 answer

Well, that hj:ignoredis the answer. This allows you to force Hyperjaxb to ignore specific classes.

Here is an example:

    <jaxb:bindings
        node="xsd:complexType[@name='issue121Type']//xsd:element[@name='simpleCollection']">
        <hj:ignored/>
    </jaxb:bindings>

Setup is performed in the scheme, as well as through xjbfiles.

See this project .

How does β€œwithout success” appear?

+5
source