From the course: XML Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Declaring elements - XML Tutorial
From the course: XML Essential Training
Declaring elements
- [Instructor] Declaring elements inside a DTD is accomplished using an elements declaration, and element declarations have the format of an angle bracket followed by exclamation point and the capital word element followed by a name and a content specification. The name field here is the name of the element you're going to be declaring and the content specification defines what the valid contents for the element is. Elements can contain one of four different types of what are known as content models. First is the empty content model in which the element has no child elements at all. No text, no tags, nothing. A good example of this is the image tag in HTML or the horizontal rule tag and so forth. Those tags have nothing inside them. Next is the any content model, which is the opposite from empty. This means the element has no content constraints whatsoever, it can contain pretty much anything. Then there's the element content model, which means the element can contain the child…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.