Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMElement::getAttrib...     IXMLDOMElement::normalize...     IXMLDOMElement Interface    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMElement::getElementsByTagName Method


Returns a list of all descendant elements that match the supplied name.

Visual Basic Syntax

Set objXMLDOMNodeList = oXMLDOMElement.getElementsByTagName(tagName)

C/C++ Syntax

HRESULT getElementsByTagName(
    BSTR tagName,
    IXMLDOMNodeList **resultList);

Parameters

tagName
[in] Name of the element to find. The string "*" matches all descendant elements of this element.
resultList
[out] DOMNodeList object containing all elements that match the supplied name.

C/C++ Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

Elements appear in the order encountered in a preorder traversal of this element's tree.

Note that the IXMLDOMNodeList object is returned even if there are no matches. In such a case, the length of the list will be set to zero.

The IXMLDOMNodeList interface is live and immediately reflects changes to the nodes that appear in the list.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.