Multiple choice technology

For the XML parser to ignore a certain section of your XML document, which syntax is correct?

  1. <![CDATA[ Text to be ignored ]]>

  2. <xml:CDATA[ Text to be ignored ]>

  3. <PCDATA> Text to be ignored </PCDATA>

  4. <CDATA> Text to be ignored </CDATA>

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

CDATA sections in XML use the syntax to tell the parser to treat the content as literal text, not markup. This is used for containing special characters or code snippets that would otherwise be interpreted as XML.