CDATA TYPE
May 3, 1999
CDATA refers to plain old character data that may
be any string of characters that does not include ampersands
(&), less than signs, (<), or quotation marks (").
Of course, as we discussed earlier, you may
use the escaped characters such as &, <,
or " if you
must include those forbidden characters
Consider the following examples:
<?xml version = "1.0"
encoding="UTF-8"
standalone = "yes"?>
<!DOCTYPE SCRIPT [
<!ELEMENT SCRIPT ANY>
<!ELEMENT DIALOG (#PCDATA)>
<!ATTLIST DIALOG ACTOR CDATA>
]>
<SCRIPT>
<DIALOG ACTOR = "Hanks">I don't think so!</DIALOG>
<DIALOG ACTOR = "Ryan">Why not?</DIALOG>
</SCRIPT>
Attribute Types
Introduction to XML For Web Developers | Table of Contents
ENUMERATED (the keyword is not actually used)
|