Export (0) Print
Expand All

IHTMLDOMNode interface

Provides methods to access all of the nodes in the document object model (DOM), to iterate the nodes, to insert nodes, to remove nodes, and to get the attributes of a node.

Members

The IHTMLDOMNode interface inherits from the IDispatch interface. IHTMLDOMNode also has these types of members:

Methods

The IHTMLDOMNode interface has these methods.

MethodDescription
appendChild

Appends an element as a child to the object.

cloneNode

Copies a reference to the object from the document hierarchy.

hasChildNodes

Returns a value that indicates whether the object has children.

insertBefore

Inserts an element into the document hierarchy as a child node of a parent object.

removeChild

Removes a child node from the object.

removeNode

Removes the object from the document hierarchy.

replaceChild

Replaces an existing child element with a new child element.

replaceNode

Replaces the object with another element.

swapNode

Exchanges the location of two objects in the document hierarchy.

 

Properties

The IHTMLDOMNode interface has these properties.

PropertyDescription

firstChild

Gets a reference to the first child in the childNodes collection of the object.

lastChild

Gets a reference to the last child in the childNodes collection of an object.

nextSibling

Retrieves a reference to the next child of the parent for the object.

nodeName

Gets the name of a particular type of node.

nodeType

Retrieves the type of the requested node.

nodeValue

Gets or sets the value of a node.

parentNode

Retrieves the parent object in the document hierarchy.

previousSibling

Gets a reference to the previous child of the parent for the object.

 

Remarks

To get an IHTMLDOMNode interface pointer for an element, call QueryInterface on an IHTMLElement interface pointer, an IHTMLElement2 interface pointer, an IHTMLElement3 interface pointer, or anIHTMLElement4 interface pointer. The IHTMLDOMNode interface is used in a variety of other contexts; see the See Also section.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference
IHTMLDOMNode2
IHTMLDocument3::createTextNode
IHTMLDocument5::createComment
IHTMLDocument5::doctype
IHTMLDOMNode::appendChild
IHTMLDOMTextNode::splitText

 

 

Community Additions

ADD
Show:
© 2014 Microsoft