How to make an element in an Xml schema as an optical

I have one element that I need to make optional.

<xs:element name="Version" type="xs:string" minOccurs="1" />

Is there any other way than to do minOccurs="0"?

+3
source share
2 answers

No, this is the right way to do this. Is there a reason you want to avoid minOccurs="0"?

+6
source

minOccurs="0" is a way to specify optional

+2
source

Source: https://habr.com/ru/post/1704951/


All Articles