Multiple choice technology web technology

What is a CDATA section in XML ? Choose the best suited answer. 1) CDATA in XML is the character data is is not parsed by the XML Processor 2) A CDATA section cannot contain the string "]]>" 3) Nested CDATA sections are not allowed

  1. Statement 1, 3 are correct

  2. Statement 2, 3 are correct

  3. Statement 1, 2, 3 are correct

  4. Statement 1, 2 are correct

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

All three statements about CDATA are correct: (1) CDATA contains unparsed character data, (2) the string ']]>' cannot appear because it marks the end of CDATA, and (3) CDATA sections cannot be nested within each other.

AI explanation

All three statements about XML CDATA sections are correct. (1) CDATA marks a block of character data that the XML parser does not parse for markup — tags/entities inside are treated as literal text. (2) A CDATA section cannot contain the literal string "]]>" because that sequence is reserved as the CDATA closing delimiter; if you need literal "]]>" you must split it across sections. (3) CDATA sections cannot be nested — you cannot place one CDATA block inside another. Since all three statements are individually true and consistent with the XML spec, 'Statement 1, 2, 3 are correct' is the right choice; the other options each wrongly omit at least one true statement.