To declare the version of XML , the correct syntax is:

To declare the version of XML , the correct syntax is:

Answer: D. <?xml version = "1.0"?>The XML declaration must begin with '<?xml' and end with '?>'. The version is specified as an attribute within this processing instruction, such as '<?xml…

  1. A.

    </xml version = '1.0'/>

  2. B.

    <?xml version = "1.0"/>

  3. C.

    <*xml version = '1.0'/>

  4. D.

    <?xml version = "1.0"?>

Attempted by 232 students.

Show answer & explanation

Correct answer: D

The XML declaration must begin with '<?xml' and end with '?>'. The version is specified as an attribute within this processing instruction, such as '<?xml version="1.0"?>'. This syntax ensures the parser correctly interprets the document structure.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…