9. DTD for Elements with Character Data

All non markup text is referred to as parsed character data in a DTD. Parsed character data is abbreviated as PCDATA in element declarations. Parsed character data means text that does not contain markup, just simple character data.

Example 9.1 An Element with PCDATA
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (#PCDATA)>
]>
<rootelement>Parsed character data.</rootelement>
	

Parsed character data is the only way to specify the content of an element and is limited to only plain text. Numbers for example would be considered only plain text.

Example 9.2 PCDATA Limited Type Support
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (#PCDATA)>
]>
<rootelement>1</rootelement>
	

In the example above, the number "1" is considered plain text.