Reputation: 892
I have a really complex xsd and now I have something like that:
<xs:element name="name" minOccurs="0" maxOccurs="1" nillable="true"/>
However when validating this xml I need to write is there a way to omit minOccurs="0"? so that I don't need to write it?
Upvotes: 1
Views: 47
Reputation: 111491
If you omit minOccurs="0"
, then the element will have to occur at least one time because the default for minOcurrs
is 1.
This is different than an empty element. An empty element looks like this:
<name/>
or
<name></name>
Upvotes: 1