15. DTD for Elements with Zero or One Child

Elements having zero or one occurrence of the same element can be defined. The "?" sign is used to declare that that the child element can occur zero or one times inside an element.

Example 15.1 An Element Having Zero or One Occurrence
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement?)>
<!ELEMENT childelement (#PCDATA)>