XML - Character data (CDATA) - Escape

Card Puncher Data Processing

XML - Character data (CDATA) - Escape

About

All text that is not markup or comment constitutes the character data of the document (known as CDATA).

CDATA is just like PCDATA, except the parser will not expect child XML content to be embedded in it.

How to escape / add reserved character in your document ?

If you want to embedded reserved characters xml character in your document, you need to enclose them in a cdata section.

An example of a CDATA section, in which

and

are recognized as character data, not xml markup:

<![CDATA[<greeting>Hello, world!</greeting>]]> 





Discover More
Domtree
DOM - Node

In DOM, every markup in an (XML|HTML) document is a node represented in a tree view. Every DOM node has at least: a , a name, and a value, which might or might not be empty. Node Type...
Jaxpintro Domapi
Java XML - DOM Jaxp

The DOM API of the JSE (ie Jaxp) in Java to process an XML file. To see other DOM implementation, see org.w3c.dom: Defines the Document class (a DOM) as well as classes for all the components...
Card Puncher Data Processing
What is a CDATA Sections in XML ? (and HTML compliancy)

HTML A cdata section delimits a text as being cdata (character data). It's used mostly to be able to use (ie escape) reserved xml characters that would otherwise be recognized as xml markup. An...
Card Puncher Data Processing
XML - Character

character in XML. Unicode Standard“1234U+1234”“10FFFDU+10FFFD”HTML“”“” Legal characters are: tab, carriage return, line feed, and the legal characters of Unicode (ISO/IEC...
Card Puncher Data Processing
XML - Character data (CDATA) - Escape

All text that is not markup or comment constitutes the character data of the document (known as CDATA). CDATAPCDATAchild If you want to embedded reserved characters xml character in your document,...
Card Puncher Data Processing
XML - Element Content

The text between a start-tag and a end-tag is called the element's content. See also: An element with no content is said to be empty. The representation of an empty element is either a start-tag...
Card Puncher Data Processing
XML - Markup

The function of the markup in an XML document is to describe its structure: storage (physical) and logical structure (and to associate attribute name-value pairs with its logical structures). Markup...
Card Puncher Data Processing
XML - Parsed Character Data (PCDATA)

Parsed Character Data (PCDATA) Parsed means that the characters <, > and & are treated specially because they are tokens that introduce child XML structures. Character data (CDATA) is just...
Card Puncher Data Processing
XSLT/XPath - (Data|Document) Model

Like the Document Object Model (DOM), the XSLT/XPath data model consists of a tree containing a variety of nodes. The XPath specification defines an abstract document model that defines seven kinds...



Share this page:
Follow us:
Task Runner