The Node Interface

The node interface is the key interface of DOM. Everything in a document can be considered a node, including the document itself. Because of its importance, the node interface is examined in some detail in this section.

Here are the read-only attributes of the node interface:

  • nodeName

  • nodeValue

  • nodeType

  • parentNode

  • childNodes

  • firstChild

  • lastChild

  • previousSibling

  • nextSibling

  • attributes

  • ownerDocument

Here are the methods of the node interface:

  • insertBefore()

  • replaceChild()

  • removeChild()

  • appendChild()

  • hasChildNodes()

  • cloneNode()

Note that all these attributes and methods are case-sensitive.

Attributes of the Node Interface

The node interface contains the most attributes and methods of all ...

Get XML Unleashed 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.