XML Elements MCQ

This section focuses on "Elements" 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. Elements can behave as containers to hold?

A. Objects
B. text
C. attributes
D. All of the above

View Answer

2. Each XML document contains _______ element?

A. Zero
B. One
C. Zero and more
D. One and more

View Answer

3. Which of the following is correct syntax to write an XML element?

A. <?element-name attribute1 attribute2>
B. <?element-name attribute1 attribute2?>
C. <element-name attribute1 attribute2>
D. <! element-name attribute1 attribute2>

View Answer

4. Element with no content is known as?

A. free element
B. empty element
C. vacent element
D. idle element

View Answer

5. Which of the following is correct XML Elements Rules?

A. The only punctuation mark allowed in names are the hyphen (-).
B. An element name cannot contain any alphanumeric characters.
C. Start and end tags of an element must be identical.
D. Names are case insensitive

View Answer

6. Which of the following is true?

A. An attribute defines a property of the element.
B. An element, which is a container, can contain text or elements
C. The only punctuation mark allowed in names are the hyphen (-), under-score (_) and period (.).
D. All of the above

View Answer

7. The default model for complex type, in XML schemas for element is

A. textOnly
B. elementOnly
C. no default type
D. Both A and B

View Answer

8. A validating XML application should be used when?

A. the design demands that all elements use both start and end tags
B. missing or out-of-place elements could cause application errors
C. attribute values cannot refer to external entity references
D. High performance is an important architectural constraint

View Answer

9. The syntax for writing the minimum occurrence for an element is?

A. <xsd:element ref=” note” min=” 0” />
B. <xsd:elements ref=” note” min=” 0” />
C. <xsd:elements ref=” note” minOccur=”0” />
D. <xsd:elements ref=” note” minOccurs=” 0” />

View Answer

10. Which of the following is used to specify the attribute list of an element?


View Answer


* You must be logged in to add comment.