我使用 Hyperjaxb 从 XML 模式生成一些带有 JPA 注释的类。我想指定应该从给定模式 xjc 中生成哪些元素。我无法更改 xsd 文件。我只能修改 bindings.xjb。我尝试使用 hj:ignored,但没有成功。
问问题
2634 次
1 回答
6
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?
于 2011-07-04T19:55:12.600 回答