Difference between and in schema definition?

后端 未结 6 477
陌清茗
陌清茗 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:42

    SIMPLE XML EXAMPLE:

    
      John
      Smith
    
    

    XSD OF ABOVE XML(Explained):

    
      
        
          
          
        
      
    
    

    Here:

    xs:element : Defines an element.

    xs:all : Denotes child elements can appear in any order.

    xs:sequence : Denotes child elements only appear in the order mentioned.

    xs:complexType : Denotes it contains other elements.

    xs:simpleType : Denotes they do not contain other elements.

    type: string, decimal, integer, boolean, date, time,

    • In simple words, xsd is another way to represent and validate XML data with the specific type.
    • With the help of extra attributes, we can perform multiple operations.

    • Performing any task on xsd is simpler than xml.

提交回复
热议问题