XML Schema MCQ
This section focuses on "Schema" in XML. These Multiple Choice Questions (MCQ) should be practiced to improve the XML skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. XML Schema is commonly known as ?
A. XZD
B. XAS
C. XSD
D. XFD
View Answer
Ans : C
Explanation: XML Schema is commonly known as XML Schema Definition (XSD)
2. What is true about XML Schema?
A. It is used to describe and validate the structure and the content of XML data.
B. XML schema defines the elements, attributes and data types.
C. It is similar to a database schema that describes the data in a database.
D. All of the above
View Answer
Ans : D
Explanation: All of the above statement are true.
3. How can be defined within an XSD?
A. <xs:element name = "x" type = "y"/>
B. <?xs:element name = "x" type = "y"/>
C. <xs:element name = "x" type = "y">
D. </xs:element name = "x" type = "y"/>
View Answer
Ans : A
Explanation: An element can be defined within an XSD as follows : <xs:element name = "x" type = "y"/>
4. _______ element is used only in the context of the text.
A. Complex Type
B. Simple type
C.
Global Types
D. All of the above
View Answer
Ans : B
Explanation: Simple type element is used only in the context of the text.
5. Which of the following are correct predefined simple types?
A. xs:integer
B. xs:char
C. xs:float
D. xs:bool
View Answer
Ans : A
Explanation: Some of the predefined simple types are: xs:integer, xs:boolean, xs:string, xs:date.
6. Attributes have _______ property.
A. name
B. type
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: Attributes in XSD provide extra information within an element. Attributes have name and type property.
7. Which allows you to specify which child elements an element can contain and to provide some structure within your XML documents?
A. Complex Type
B. Simple type
C. Global Types
D. All of the above
View Answer
Ans : A
Explanation: A complex type is a container for other element definitions. This allows you to specify which child elements an element can contain and to provide some structure within your XML documents
8. A schema describes?
A. structure
B. datatype of XML document
C. grammer
D. All of the above
View Answer
Ans : D
Explanation: A schema describes All of the above.
9. Microsoft XML Schema Data Type “ boolean” has values?
A. True ,False
B. True ,False, 1,0
C. 1,0
D. any number other then zero and one
View Answer
Ans : C
Explanation: Microsoft XML Schema Data Type “ boolean” has values 1,0.
10. Simple type Built into Schema "data" represent a data in?
A. MM-DD-YY
B. DD-MM-YYYY
C. YY-MM-DD
D. YYYY-MM-DD
View Answer
Ans : D
Explanation: Simple type Built into Schema “ data’ represent a data in YYYY-MM-DD.
Discussion