This is a discussion on CDATA Section in XML within the XML and SOAP forums, part of the Web Development category; Hi Guys can any one help me out in the CDATA section in XML?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hi, CDATA Everything inside a CDATA section is ignored by the parser. If your text contains a lot of "<" or "&" characters - as program code often does - the XML element can be defined as a CDATA section. A CDATA section starts with "<![CDATA[" and ends with "]]>": <script> <![CDATA[ function matchwo(a,b) { if (a < b && a < 0) then { return 1 } else { return 0 } } ]]> </script> In the example above, everything inside the CDATA section is ignored by the parser. Notes on CDATA sections: A CDATA section cannot contain the string "]]>", therefore, nested CDATA sections are not allowed. Also make sure there are no spaces or line breaks inside the "]]>" string. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Analytical Writing section | anbuchezhians | Software Testing | 2 | 08-10-2007 12:37 AM |
| How to write contents as CDATA in XML using c#? | Archer | C# Programming | 0 | 07-17-2007 10:57 PM |
| Cdata | raj | XML and SOAP | 0 | 07-17-2007 12:11 AM |
| Article Section? | Karpagarajan | Discussweb HQ | 2 | 04-05-2007 02:57 AM |