select_attr_starts_with

returns elements that have the specified attribute and the value that starts with the given value.

Arguments

Source


def select_attr_starts_with(self, attr, value):
    ret = pyNodeList()
    for node in self:
        if node.attr_starts_with(attr, value):
            ret.append(node)
    if len(ret) == 1: return ret[0]
    else: return ret