85Chapter 14 (Web hosting services) .Document Object Model Essentials The Object-Oriented
Sunday, September 30th, 200785Chapter 14 .Document Object Model Essentials The Object-Oriented W3C DOM If you are familiar with concepts of object-oriented (OO) programming, you will appreciate the OO tendencies in the way the W3C defines the DOM. The Node object includes sets of properties (Table 14-4) and methods (Table 14-6) that are inherited by every object based on the Node. Most of the objects that inherit the Node s behavior have their own properties and/or methods that define their specific behaviors. The following figure shows (in W3C DOM terminology) the inheritance tree from the Node root object. Most items are defined in the Core DOM, while items shown in boldface are from the HTML DOM portion. W3C DOM Node object inheritance tree You can see from the preceding figure that individual HTML elements inherit properties and methods from the generic HTML element, which inherits from the Core Element object, which, in turn, inherits from the basic Node. It isn t important to know the Node object inheritance to script the DOM. But it does help explain the ECMA Script Language Binding appendix of the W3C DOM recommendation, as well as explain how a simple element object winds up with so many properties and methods associated with it. Node +–Document | +–HTMLDocument +–CharacterData | +–Text | | +–CDATASection | +–Comment +–Attr +–Element | +–HTMLElement | +–(Each specific HTML element) +–DocumentType +–DocumentFragment +–Notation +–Entity +–Entity Reference +–ProcessingInstruction The IE5/Windows incomplete implementation of the W3C DOM does not treat the Note document object as a node in the true sense. It has no nodeType property defined for it, nor does the document node appear as the parent node of the HTML node of a page. Even so, the document object remains the root of all references in a page s scripts.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.