Root element

From Wiki @ Karl Jones dot com
Jump to: navigation, search

In an XML document, the root element is the top element in the hierarchy.

Description

Each XML document has exactly one single root element.

It encloses all the other elements and is therefore the sole parent element to all the other elements.

Root elements are also called Parent elements.

Definition

The World Wide Web Consortium defines not only the specifications for XML itself, but also the Document Object Model, which is a platform- and language-independent standard object model for representing XML documents.

documentElement

DOM Level 1 defines, for every XML document, an object representation of the document itself and an attribute or property on the document called documentElement.

This property provides access to an object of type element which directly represents the root element of the document.

See also

External links