1

How the list can be implemented in the XML schema (xsd )? So that the mapping with the Java class should create variable of java.util.List Type instead of Object Type ?

Deepak M
  • 223
  • 4
  • 14

1 Answers1

1

Use maxOccurs="unbounded" in elements or list type in attributes. Something like:

<xs:element name="strings" type="xs:string" maxOccurs="unbounded"/>

<xs:attribute name="ints" type="ints"/>

<xs:simpleType name="ints">
  <xs:list itemType="xs:int"/>
</xs:simpleType>

However, specific mapping depends on the library you use.

lexicore
  • 42,748
  • 17
  • 132
  • 221