使用 JAXB 生成 XML 绑定类.
架构基于一组旧版 XML 文件,并包含以下代码段:
<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.