klyn.io.xml.dom.DomDocument.getElementsByTagName
method

    public getElementsByTagName(tagName as String) as DomNodeList:

Description

Returns document descendant elements matching a tag name.

Parameters

- tagName Tag name to match, or `*` for all descendants.

Returns

Matching elements as a DOM node list and Klyn list.

Example

    document = DOMParser().parseFromString("<root><item/></root>")
    items = document.getElementsByTagName("item")
    print(items.item(0).tagName)