Cdata in XML


When creating XML documents, sometimes there are blocks of text that contain characters that may prove to be a problem when trying to validate the document. An example of this would be if the XML data contains a programming script, many of which contain characters such as >, <, &, etc, which will likely cause problems for the XML processor.  To avoid this, CDATA can be used to eliminate the need to go through the entire script.  During validation, the XML processor skips all data between the CDATA tags.  The syntax for CDATA is shown in the example below:

Example: <root_element>



Text and script that should be skipped




This entry was posted in XML Tutorial. Bookmark the permalink.

3 Responses to Cdata in XML

  1. THERE are few things on the Great Barrier Reef to make the world famous dolphins pale in comparison

  2. ed sheeran x says:

    I’ve been exploring for a little bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this site. Reading this info So i’m happy to convey that I’ve an incredibly good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to do not forget this web site and give it a look regularly.

  3. I’m impressed, I must say. Really rarely should i encounter a weblog that’s both educative and entertaining, and without a doubt, you have hit the nail for the head. Your thought is outstanding; the thing is a thing that inadequate persons are speaking intelligently about. I’m delighted that we came across this during my find some thing concerning this.

Leave a Reply

Your email address will not be published.