Microsoft XML SDK 2.6 - XML Reference

getElementsByTagName Method (XMLDOMElement)

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

objXMLDOMNodeList = oXMLDOMElement.getElementsByTagName(tagName)

Parameters

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

Return Value

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.

See Also

Applies To: XMLDOMElement Object