Difference between and in schema definition?

后端 未结 6 462
陌清茗
陌清茗 2020-12-24 00:01

I am using xsd:all in a complex type. When I miss any mandatory elements while validating it will show all the elements. It will not display the exact missed e

6条回答
  •  悲哀的现实
    2020-12-24 00:50

    Difference:

    • xsd:all - "child elements can appear in any order and each child element can occur zero or one time" (ie, maxOccurs can be 0 or 1)
    • xsd:sequence - "child elements must appear in a sequence. Each child element can occur from 0 to any number of times" (ie, maxOccurs can be 0 or any number or 'unbounded')

    From the W3Schools tutorials here and here.

提交回复
热议问题