【发布时间】:2017-07-22 09:01:12
【问题描述】:
我有一个 java jaxb 注释类
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement()
public class xmlDoc<T> {
@XmlMixed
@XmlAnyElement(lax=false)
protected T content;
public T getContent() {
return this.content;
}
public void setContent(T t) {
this.content = t;
}
}
当我使用 jaxb 生成 xml 架构时,我得到以下输出
<xs:complexType mixed="true" name="xmlDoc">
<xs:sequence>
<xs:any namespace="##other" processContents="skip"/>
</xs:sequence>
</xs:complexType>
jaxb 中是否有任何注释参数,我可以使用它来控制任何元素类型的命名空间。我需要##any 而不是##other。 这可能吗?
【问题讨论】: