children

returns child elements.

Source


def children(self):
    ret = pyNodeList()
    for node in self:
        ch = node.children()
        if isinstance(ch, pyNodeList) and len(ch) != 0:
            ret.extend(ch)
        elif isinstance(ch, pyNode):
            ret.append(ch)
    if len(ret) == 1: return ret[0]
    else: return ret