The XML------is optional. If it exists, it must come first in the document

The XML------is optional. If it exists, it must come first in the document

Answer: A. prologCorrect answer: prolog Explanation: The XML prolog (for example <?xml version="1.0" encoding="UTF-8"?>) is optional. If it appears, it must come first in the…

  1. A.

    prolog

  2. B.

    descriptive

  3. C.

    UTF-8

  4. D.

    1056

Attempted by 229 students.

Show answer & explanation

Correct answer: A

Correct answer: prolog

Explanation: The XML prolog (for example <?xml version="1.0" encoding="UTF-8"?>) is optional. If it appears, it must come first in the document, before the root element. The prolog can declare the XML version and an optional encoding.

  • Why this is correct: The prolog is the declaration that may include version and encoding and by XML rules, when present it must precede the root element.

  • Why 'descriptive' is incorrect: It is not an XML declaration or required structural element.

  • Why 'UTF-8' is incorrect: UTF-8 is an encoding name that can appear inside the prolog as the encoding value, but by itself it is not what must come first.

  • Why '1056' is incorrect: A numeric value like 1056 is unrelated to XML document structure.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…