XML Schema has the concept of a list of data types.
<xs:attribute name="actualValue">
<xs:simpleValue>
<xs:list itemType="xs:string"/>
<xs:simpleValue>
</xs:attribute>
This is represented in XML as space separated values.
<foo actualValue="one two three"/>
This is what you have asked JAXB to do by placing the @XmlAttribute
annotation on a property of type List<String>
. See "Example 3" in the javadoc for @XmlAttribute
.
If you replace @XmlAttribute
with @XmlElement
you will ge the following representation:
<foo>
<actualValue>one</actualValue>
<actualValue>two</actualValue>
<actualValue>three</actualValue>
</foo>