Microsoft XML 2.5 SDK


 

getElementsByTagName Method

[This is preliminary documentation and subject to change.]

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

Syntax

objXMLDOMNodeList = oXMLDOMElement.getElementsByTagName(tagName)

Parameters

tagName

String specifying the name of the element to find. The string "*" matches all descendant elements of this element.

Returns

Object. Returns an XMLDOMNodeList object containing all elements that match the supplied name.

Remarks

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

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

The XMLDOMNodeList object is live and immediately reflects changes to the nodes that appear in the list.

Applies To

XMLDOMElement