Add getChildNodes() method to Node

This commit is contained in:
Jeremy Hylton 2001-08-14 18:58:00 +00:00
parent 34aeeffb62
commit eef65908a1
2 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
def getChildNodes(self):
return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):

View File

@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
def getChildNodes(self):
return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):