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?
- A.
<!-- This is a
multi-line
XML comment -->
- B.
/*
This XML file
contains a list
of custom information
*/
- C.
// This is a
// multi-line
// XML comment
- 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.