tag

returns elements that are matching the tag name.

Arguments

Source


def tag(self, tag):
    t = tag.lower()
    ret = pyNodeList()
    for node in self:
        if node.name() == t:
            ret.append(node)
    if len(ret) == 1: return ret[0]
    else: return ret