Which of the following commands is used to comment out multiple lines in an…

2023

Which of the following commands is used to comment out multiple lines in an XML file?

  1. A.

    <!-- This is a

    multi-line

    XML comment -->

  2. B.

    /*

    This XML file

    contains a list

    of custom information

    */

  3. C.

    // This is a

    // multi-line

    // XML comment

  4. D.

    <--

    This XML file

    contains a list

    of custom information

    -->

Attempted by 164 students.

Show answer & explanation

Correct answer: A

XML documents require specific delimiters to mark sections as comments. Enclose your text block between <!-- and --> to span multiple lines correctly. Syntax from other programming languages like Java or C is invalid within XML files.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs