【发布时间】:2011-10-07 16:41:52
【问题描述】:
我需要在 XSD 中处理类型及其关系(查找从抽象类型降序的所有具体类型等) 此页面声称可以通过 JAXB:http://www.antonioshome.net/blog/2009/20091012-1.php 但我收到 Java 6 附带的 xjc 错误。错误是:
[ERROR] Element "{http://www.w3.org/2001/XMLSchema}annotation" shows up in more
than one properties.
line 248 of file:/C:/tmp/xsdProcessing/XMLSchema.xsd
[ERROR] The following location is relevant to the above error
line 242 of file:/C:/tmp/xsdProcessing/XMLSchema.xsd
我看到了对问题的引用,但我没有看到对问题根源或解决方案的任何明确解释。 那么到今天为止,是否可以使用 JAXB 为 xml 模式处理 xml 模式?如果没有,还有什么替代方案? JAXB 如何处理模式以创建 Java 对象?
【问题讨论】: