Overview of the DOM interfaces

The Document Object Model (DOM) is an abstract definition of an API (application program interface) for manipulating XML document structures. The DOM is a Recommendation of the World Wide Web Consortium (W3C), developed and maintained by the W3C DOM Working group. HoTMetaL PRO follows the DOM Level 1 Specification.

The DOM was designed specifically to represent XML structures, but can represent HTML documents as well.

HoTMetaL PRO implements the DOM (that is, provides a concrete implementation of the API) using COM interfaces that enable you to access document structures using any scripting language that conforms to the Microsoft Scripting Language Interface.

The DOM refers to abstract data objects as interfaces. This is because the DOM does not specify an underlying implementation (such as a class) for these data objects. The DOM does not consist of any particular language or implementation. Rather, it describes document structures in terms of the tools used to manipulate the structure: attributes (not to be confused with element attributes in the XML/SGML/HTML sense), which we call properties, and methods. A concrete instance of an interface is referred to as an object.

The DOM interfaces represent a document as a logical node structure (that is to say, users can think of the structure as node based, but the implementation details are the choice of the vendor and are considered to be unimportant to the end-user).

The distinction between properties and methods is sometimes blurred, since both types of operations can modify their objects. The basic distinction is that setting a property should not affect the value of any other property, whereas methods cause the object to perform some action which may or may not change one of its properties.

The basic DOM interface is the DOMNode interface. All DOM interfaces inherit this interface, with three exceptions: DOMNodeList, which is an ordered collection of DOMNodes; DOMNamedNodeMap, an unordered collection of DOMNodes; and DOMImplementation, a `meta-object' that provides information about the specific DOM implementation being used.

You can think of each interface as a type of DOMNode, which may be qualified in either or both of the following ways:

Each DOMNode has a nodeType property, which identifies what kind of node it is (DOMElement, DOMText, etc.)

Note: The DOM objects are read-only in this version of HoTMetaL PRO. To modify the DOM structure (for example, to insert elements or attributes), use Selection or Range methods.


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999