Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 02-04-2009
Member
 
Join Date: May 2008
Posts: 11
CDATA Sections in XML

CDATA sections may occur anywhere character data may occur and they are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "<![CDATA[" and end with the string "]]>":]

CDATA Sections can be divided into four parts:

1. CDSect ::= CDStart CData CDEnd

2. CDStart ::= '<![CDATA['

3. CData ::= (Char* - (Char* ']]>' Char*))

4. CDEnd ::= ']]>'


Within a CDATA section, only the CDEnd string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "&lt;" and "&amp;". CDATA sections cannot be nested.

An example of a CDATA section, in which "<greeting>" and "</greeting>" are recognized as character data, not markup:
Code:
<![CDATA[<greeting>Hello, world!</greeting>]]>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "CDATA Sections in XML"
Thread Thread Starter Forum Replies Last Post
Water and sky sections appears black in Worms Armageddon Elucidation Video Games 5 29-03-2011 10:35 AM
How to build xml CDATA sections in java? MABON Software Development 4 30-01-2010 05:50 PM
Converting CDATA Node into Text Node Jagdish Gada Software Development 3 07-12-2009 09:54 AM
Is it possible to repair dead pixel sections of a lcd tv pratikag Monitor & Video Cards 3 01-08-2009 11:43 AM


All times are GMT +5.5. The time now is 07:25 AM.