next_all

returns elements after this element that are in the same DOM hierarchy.

Source


def next_all(self):
    ret = pyNodeList()
    if self.has_parent():
        brothers = self._parent.children()
        if isinstance(brothers, pyNodeList) and len(brothers) != 0:
            passed = False
            for bro in brothers:
                if bro.name() != 'comment':
                    if passed: ret.append(bro)
                    if not passed and bro == self: passed = True
    if len(ret) == 1: return ret[0]
    else: return ret