XML - CDATA Sections - Tutorialspoint
Maybe your like
- XML - Home
- XML - Overview
- XML - Syntax
- XML - Documents
- XML - Declaration
- XML - Tags
- XML - Elements
- XML - Attributes
- XML - Comments
- XML - Character Entities
- XML - CDATA Sections
- XML - White Spaces
- XML - Processing
- XML - Encoding
- XML - Validation
- XML - DTDs
- XML - Schemas
- XML - Tree Structure
- XML - DOM
- XML - Namespaces
- XML - Databases
- XML Tools
- XML - Viewers
- XML - Editors
- XML - Parsers
- XML - Processors
- XML Useful Resources
- XML - Quick Guide
- XML - Useful Resources
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- AI Based Resume Builder
- Personal AI Study Assistant
- Generate Coding Logic
- HR Interview Questions
- Computer Glossary
- Who is Who
In this chapter, we will discuss XML CDATA section. The term CDATA means, Character Data. CDATA is defined as blocks of text that are not parsed by the parser, but are otherwise recognized as markup.
The predefined entities such as <, >, and & require typing and are generally difficult to read in the markup. In such cases, CDATA section can be used. By using CDATA section, you are commanding the parser that the particular section of the document contains no markup and should be treated as regular text.
Syntax
Following is the syntax for CDATA section −
<![CDATA[ characters with markup ]]>The above syntax is composed of three sections −
CDATA Start section − CDATA begins with the nine-character delimiter <![CDATA[
CDATA End section − CDATA section ends with ]]> delimiter.
CData section − Characters between these two enclosures are interpreted as characters, and not as markup. This section may contain markup characters (<, >, and &), but they are ignored by the XML processor.
Example
The following markup code shows an example of CDATA. Here, each character written inside the CDATA section is ignored by the parser.
<script> <![CDATA[ <message> Welcome to TutorialsPoint </message> ]] > </script >In the above syntax, everything between <message> and </message> is treated as character data and not as markup.
CDATA Rules
The given rules are required to be followed for XML CDATA −
- CDATA cannot contain the string "]]>" anywhere in the XML document.
- Nesting is not allowed in CDATA section.
Tag » Add Cdata Tag In Xml
-
How Do I Add CDATA To An Xml File? - Stack Overflow
-
XML CDATA | How CDATA Works In XML With Examples - EduCBA
-
How To Programmatically Add A CDATA Section To An XML Document ...
-
What Does Node In A XML Document | Our Code World
-
Adding CDATA Section To XML Element - ⋮IWConnect
-
Adding Tag
-
How To Add CData In The XML Nodes Using Dataweave 2.0?
-
Working With CDATA | Functional Testing - SoapUI
-
eateCDATASection() - Web APIs - MDN - Mozilla
-
XmlDocument.CreateCDataSection(String) Method (System.Xml)
-
How To Stop An XML Map From Adding !CDATA Elements For ... - IBM
-
XMLNSC: Working With CData - IBM
-
XML CDATA - W3resource
-
Add CDATA To SimpleXMLElement Without Create A Custom Class