Xml JAXB绑定XPath错误
我试图修复JAXB从一组XSD生成类时的冲突。以下是XML:Xml JAXB绑定XPath错误,xml,xpath,jaxb,xjc,xjb,Xml,Xpath,Jaxb,Xjc,Xjb,我试图修复JAXB从一组XSD生成类时的冲突。以下是XML: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...> ... <xs:simpleType name="List_OfferDimensionUOM"> ... </xs:simpleType> </xs:schema> 我已经搜索了几个小时,寻找答案,但没有找到什么帮助。错误消息
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
...
<xs:simpleType name="List_OfferDimensionUOM">
...
</xs:simpleType>
</xs:schema>
我已经搜索了几个小时,寻找答案,但没有找到什么帮助。错误消息说它位于错误的位置是没有意义的,因为我相当确定我的XPath是有效的。另外,“其他绑定”也没有意义,因为目前只有一个绑定。我发现了问题。这比我在这里的位置高了一步。指向“List\u OfferDimensionUOM”元素的堆栈跟踪没有指向问题的根源。后面的堆栈跟踪指向正确的元素,并带有语句:“此错误与上述内容相关”或类似的内容--
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="OTA_Lists.xsd" node="/xs:schema">
<jxb:bindings node="xs:simpleType[@name='List_OfferDistanceUOM']">
<jxb:property name="List_OfferDistanceUOMList"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings.