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 parsers to treat the content as literal text, ignoring any special characters or markup within. Option A shows the correct syntax.

AI explanation

To answer this question, you need to understand how to ignore a certain section of an XML document using CDATA.

Option A) - This option is correct. The CDATA section is used to indicate that the enclosed text should be treated as character data and should be ignored by the XML parser. The correct syntax for a CDATA section is .

Option B)