XML CDATA




XML CDATA

  • CDATA means character data.
  • CDATA is defined as blocks of text that are not parsed by the parser. But they are recognized as a markup.
  • The predefined entities such as <, >, and & require typing and they are generally difficult to read in the markup.
  • In such cases, CDATA section can be used. Using CDATA section, user commanding the parser that the particular section of the document contains no markup and should be treated as regular text.
 Example for XML CDATA

Learn XML - XML tutorial - Example for XML CDATA - XML examples - XML programs

Syntax

  • The CDATA syntax contains three sections:
    • CDATA Start section − CDATA begins with the nine-character delimiter <![CDATA[
    • CDATA Content section − This section contain markup characters (<, >, and &), but they are ignored by the XML processor.
    • CDATA End section − CDATA section ends with ]]> delimiter.
     <![CDATA[
	Character that contain markup
	      ]]>

Example for CDATA

 Example for XML CDATA

Learn XML - XML tutorial - Example for XML CDATA - XML examples - XML programs

The output of the above example look like this

 XML CDATA Example

Learn XML - XML tutorial - XML CDATA Example - XML examples - XML programs

CDATA Rules

  • Cdata cannot contain the string “]]>” anywhere in the document
  • Cdata not allowed nesting


Related Searches to XML CDATA

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×