O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Element hierarchies

A key feature of container elements is that they are often permitted to contain other elements. For example, a Book element should be expected to be able to contain Chapter elements, and Chapter elements should be able to contain Section elements. This is termed an element hierarchy.

The document element hierarchy may be visualized as boxes within boxes, or as branches of a tree. A tree representation can be drawn in any direction, but left-to-right or top-to-bottom is perhaps the most natural way to view it:

Ultimately, a complete document must be enclosed by a single element. This element lies at the root of the tree, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required