Hello I need to show the array of strings in XSD. I've tried this, Can any one help me write it correctly. Thanks.
What it prints
<numbers>13 32 23</numbers>
Current XSD
<xs:element name="numbers" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:list itemType="xs:string">
</xs:list>
</xs:simpleType>
What I need is below.
<numbers>
<number>13</number><number>32</number>
</numbers>
The question is resolved since Petru's answer is correct. I just want to add some additional information I found related with this same topic about how to define array types, optional and mandatory:
<xsd:element name="A"/>
means A is required and must appear exactly once.
<xsd:element name="A" minOccurs="0"/>
means A is optional and may appear at most once.
<xsd:element name="A" maxOccurs="unbounded"/>
means A is required and may repeat an unlimited number of times
<xsd:element name="A" minOccurs="0" maxOccurs="unbounded"/>
means A is optional and may repeat an unlimited number of times
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With