The elements which do not have any children can have default values. Default values are assigned automatically if no value is supplied.
The elements which do not have any children can have default values. Default values are assigned automatically if no value is supplied.<xs:element name="type" type="xs:string" default="XYZ"/> |
If we use "type" element with value as given below, then its default value is not considered and the value provided to the element will be accepted.
<type>ABC</type> |
If we use "type" element without value as given below, then its default value will be assigned automatically. Now in this case, type element will be assigned XYZ value.
<type/> |