Multiple choice technology architecture

When we need to use CDATA Section in XML?

  1. To validate if the XML is well formed.

  2. To pretty print the XML.

  3. To include HTML in an XML Document without getting parsed.

  4. It provides a qualified name for an XML element or attribute.

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

CDATA sections allow you to include text containing special characters like <, >, & that would otherwise be parsed as XML markup. This is useful when embedding HTML, JavaScript, or other code within XML documents. The parser treats everything inside CDATA as literal text.