XML DTDLesson 77Free preview
DTD Elements
This lesson is part of XML · All levels
Summary
The DTD element declaration is <!ELEMENT content name>, where the content can be EMPTY, ANY, #PCDATA, or a child list with operator, + *? The comma sign means mandatory order, the pipe sign means choice of one, and the?*+ sign sets the number of appearances. This pattern is similar to a regular expression for XML structures.
Key points
- Empty = no content; ANY = text or free child; #PCDATA = text only
- (to,from) means to then from in sequence
- (to choose from) means one
- Operator? = zero or one, * = zero or more, + = one or more
- Mixed content is written as (#PCDATA}}
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.