select_attr_not_equal

returns elements that have the specified attribute and the value that is not equals to the given value.

Arguments

Source


def select_attr_not_equal(self, attr, value):
    ret = pyNodeList()
    for node in self:
        a = node.attr(attr)
        if a is None or a != value:
            ret.append(node)
    if len(ret) == 1: return ret[0]
    else: return ret