我在 XSD 架构中有一个元素:
<xsd:any processContents="skip"/>
是否可以通过 XJB 绑定切换processContents
到?strict
无需修改架构文件。可以将其设置为全局属性。我想得到:
@XmlAnyElement(lax = true)
protected Object any;
代替:
@XmlAnyElement
protected Element any;
You could totally change the annotation and the attribut's type. But beware if you generate your code from the XSD your modifications would be crushed.
Could you explain a little bit more your work context, needs and goals. Why can't you touch the XSD, do you generate classes from the XSD by JaxB? Do you use the XSD for validation purposes?