2.1 Node

The Node interface is the primary data type for the entire Document Object Model.It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a DOMException being raised.

The attributes (nodeName, nodeValue, and attributes) are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (for example, nodeValue for an Element or attributes for a Comment), these attributes return NULL. The specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.

NOTE:This C++ binding adds the following methods to the DOM Level 1 specified methods:

    void enableExceptions (int enable); 
    DOMException * getLastError (); 
    void destroy();