Questions & Answers.
Section 1: XML Basics and Syntax (Questions 1-30)
1. What does XML stand for?
A. eXtra Modern Link
B. eXtensible Markup Language
C. Example Markup Language
D. X-Markup Language
Answer: B
Rationale: XML stands for eXtensible Markup Language. It is called "extensible"
because users can create their own custom tags rather than being limited to a
predefined set .
2. What is a fundamental requirement for all XML documents regarding their
structure?
,A. They must be encoded in UTF-8 only
B. They must have a fixed number of elements
C. They must contain one root element
D. They must use only predefined tags
Answer: C
Rationale: Every XML document must contain a single root element that serves as
the parent for all other elements, ensuring a proper hierarchical structure .
3. Which of the following falls under the Prolog section of an XML document?
A. XML declaration
B. Elements
C. Tags
D. Attributes
Answer: A
,Rationale: The XML prolog contains the XML declaration (e.g., <?xml
version="1.0" encoding="UTF-8"?>). The prolog is optional but if present, it must
come first in the document .
4. What is the default character encoding for XML documents?
A. ASCII
B. ISO-8859-1
C. UTF-16
D. UTF-8
Answer: D
Rationale: UTF-8 is the default character encoding for XML documents. To avoid
errors with international characters, the encoding should be specified or files
should be saved as UTF-8 .
5. Which statement about XML tags is correct?
A. XML tags are not case sensitive
, B. XML tags are case sensitive
C. XML tags are only partially case sensitive
D. XML tags are case insensitive
Answer: B
Rationale: XML tags are case sensitive. The tags <Letter> and <letter> are
considered different, which is crucial for accurate data representation .
6. What is the consequence of having a nested element that is closed outside of
its parent element?
A. The XML document would still be valid
B. The XML document would be considered invalid and may not be processed
correctly
C. The nested element would automatically be corrected by the parser
D. The XML document would be processed with warnings but remain valid
Answer: B