11.1. The object structure of the DOM

11.1.1. The DOM structure

According to the W3C authority, the DOM is designed to allow programs and scripts to dynamically access and update the contents, structures, and styles of documents. Some of these features were discussed in Chapter 10. In fact almost any elements in an HTML/XHTML document can be accessed, modified, deleted, or added by using the DOM’s features. To do this, the DOM must have an internal representation of the entire page. More precisely, inside the DOM each document has a logical structure, or representation, that is very much like a tree.

For example, if an XHTML document is a big tree, then the following XHTML table in ex11-01.txt can be considered as a branch of the tree:

Listing ...

Get Practical Web Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.