Is the Dom a Tree?

Is the Dom a Tree?

The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree.

Why is the DOM a tree?

How is the DOM created (and what does it look like)? ... The object structure of the DOM is represented by what is called a “node tree”. It is so called because it can be thought of as a tree with a single parent stem that branches out into several child branches, each which may have leaves.

Is the DOM a binary tree?

You will notice that parent nodes in the DOM have more than two children, and that means that the DOM is not a binary tree or binary search tree (or BST as I'm seeing it abbreviated here and there).

Sophia Al-Mansoor
Author

Sophia Al-Mansoor

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.