nerdexam
Microsoft

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"

Understanding .NET Framework Concepts

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)
  • A
    3% (2)
  • B
    77% (47)
  • C
    15% (9)
  • D
    5% (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

#XML Schema#fixed attribute#xs:element#XSD syntax

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice