【发布时间】:2011-05-22 14:28:11
【问题描述】:
使用 JAXB 生成 XML 绑定类。
架构基于一组旧的 XML 文件,并包含这个 sn-p:
<xs:complexType name="MetaType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="Name" />
<xs:attribute type="xs:string" name="Scheme" />
<xs:attribute type="xs:string" name="Value" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
'Value'属性与xs:string的'value'属性冲突,代码生成失败,报错:
com.sun.istack.SAXParseException2: Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
【问题讨论】: