0
このクラスをXMLからアンマーシャリングする際に問題が発生しました。JAXBアンマーシャリングX、X *
この問題は、 'propertyset'という2つの要素によって発生します。実際に何が起きるかは、最初のプロパティセットが正しく整列されていない場合は、すぐに2番目のプロパティセットが上書きされます。
このXMLを非整列化するために使用できる注釈/構成はありますか?
/**
* <p>Java class for a element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="a">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="propertyset"/>
* <element ref="propertyset" minOccurs="0"/>
* </sequence>
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"propertyset",
"systempropertyset"
}, factoryMethod = "createAEx", factoryClass = ObjectFactoryEx.class)
@XmlRootElement(name = "a")
public class A
{
@XmlElement(required = true, type = B.class)
protected B propertyset;
@XmlElement(name = "propertyset", type = B.class)
protected B systempropertyset;
...
}