98-372 · Question #52
How to define a fixed value, Yellow, for an XML schema simple element?
The correct answer is B. <xs:element name="ColorName" type="xs:string" fixed="Yellow"/>. In XML schema, a fixed value is automatically assigned to the element, and it is not possible to specify another value. The following is the syntax for the fixed value: <xs:element name="element_name" type="data_type" fixed="value"/> <xs:element name="ColorName" type="xs:string"
Question
How to define a fixed value, Yellow, for an XML schema simple element?
Options
- A<xs:element name="ColorName" default="Yellow"/>
- B<xs:element name="ColorName" type="xs:string" fixed="Yellow"/>
- C<xs:element name="ColorName" type="string" fixed="Yellow"/>
- D<xs:element name="ColorName" type="xs:string" Default="Yellow"/>
How the community answered
(61 responses)- A3% (2)
- B77% (47)
- C15% (9)
- D5% (3)
Explanation
In XML schema, a fixed value is automatically assigned to the element, and it is not possible to specify another value. The following is the syntax for the fixed value: <xs:element name="element_name" type="data_type" fixed="value"/> <xs:element name="ColorName" type="xs:string" fixed="Yellow"/> Here, the fixed value is "Yellow".
Topics
Community Discussion
No community discussion yet for this question.