select_next

returns elements that are next elements.

Source


def select_next(self):
    ret = pyNodeList()
    for node in self:
        n = node.next_element()
        if n is not None:
            duplicated = False
            if len(ret) != 0:
                for r in ret:
                    if r == n:
                        duplicated = True
                        break
            if not duplicated: ret.append(n)
    if len(ret) == 1: return ret[0]
    else: return ret