encyclopegia.org

Root element

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 document elements. In HTML, the root element is the element. The World Wide Web Consortium defines not only the specifications for XML itself, but also the DOM, which is a platform- and language-independent standard object model for representing XML documents. 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. content There can be other XML nodes outside of the root element. In particular, the root element may be preceded by a prolog, which itself may consist of an XML declaration, optional comments, processing instructions and whitespace, followed by an optional DOCTYPE declaration and more optional comments, processing instructions and whitespace. After the root element, there may be further optional comments, processing instructions and whitespace within the document. Within the root element, apart from any number of attributes and other elements, there may also be more optional text, comments, processing instructions and whitespace.…

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 document elements. In HTML, the root element is the element. The World Wide Web Consortium defines not only the specifications for XML itself, but also the DOM, which is a platform- and language-independent standard object model for representing XML documents. 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. content There can be other XML nodes outside of the root element. In particular, the root element may be preceded by a prolog, which itself may consist of an XML declaration, optional comments, processing instructions and whitespace, followed by an optional DOCTYPE declaration and more optional comments, processing instructions and whitespace. After the root element, there may be further optional comments, processing instructions and whitespace within the document. Within the root element, apart from any number of attributes and other elements, there may also be more optional text, comments, processing instructions and whitespace. A more expanded example of an XML document follows, demonstrating some of these extra nodes along with a single rootElement element. ]> ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Root element." encyclopegia.org, 2026, https://encyclopegia.org/wiki/root-element. Accessed 24 November 2026.

Chicago

"Root element." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/root-element.

APA

encyclopegia.org. (2026). Root element. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/root-element

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Corymb

enwiki · references available

Amicalola Falls

enwiki · references available

Fort McAllister Historic State Park

enwiki · references available

Swattenden

enwiki · references available

Bunessan

enwiki · references available

Knockan

enwiki · references available

*H₂éwsōs

enwiki · references available

Credit River

enwiki · references available

A. H. Stephens State Park

enwiki · references available

Half a Loaf of Kung Fu

enwiki · references available

Runar Berg

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1365574384 · 0.5 · snapshot enwiki-001365574384

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.