Element declarations

An element declaration is used to define a new element and specify its allowed content. The keyword 'ELEMENT' introduces an element declaration. The name of the element being declared follows (recall the constraint to an initial letter, underscore character, '_', or colon, ':', and thereafter also digits, '.' and '-'), separated by at least one space character:

<!ELEMENT title ..... >

A statement of the legal content of the element is the final required part of the declaration. An element may have no content at all, may have content of only child elements, of only text, or of a mixture of elements and text. If the element can hold no child elements, and also no text, then it is known as an empty element. The keyword 'EMPTY' ...

Get XML Companion, The, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.