An XML file models a hierarchical database. The position of an element in an XML hierarchy represents its relationship to other elements. For example, an element can contain child elements, and elements can inherit characteristics from other elements.