IHTMLDOMChildrenCollection::item Method

Retrieves an object from a childNodes or StaticNodeList collection.

Syntax


HRESULT item(
    long index,
    IDispatch **ppItem
);

Parameters

index
[in]  An long that specifies the zero-based index of the item to get.
ppItem
[out, retval]  A IDispatch interface pointer that represents an object if successful; otherwise NULL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

To This function returns S_OK even if the element is not found. Check the value of the IDispatch pointer returned by this call. If the value of the pointer is NULL, the element was not found, and the call was not successful.

Items in a StaticNodeList are not changed when the Document Object Model (DOM) changes. Nodes may be removed from the document, but still remain in the StaticNodeList collection.

Community Additions

ADD
Show:
© 2014 Microsoft