Click to return to the XML (Extensible Markup Language) home page    
XMLDOMElement getAttribut...     XMLDOMElement normalize M...     XMLDOMElement Object    
Web Workshop  |  XML (Extensible Markup Language)

getElementsByTagName Method


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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMElement


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.