getAllNodes doğrudan çağırıldığında liste almıyor.

This commit is contained in:
Barış Metin
2005-06-20 13:31:14 +00:00
parent 6ba80f8d86
commit a09109f02f
+4 -3
View File
@@ -59,9 +59,11 @@ def getNode(node, tagpath):
return node return node
def getAllNodes(node, tags): def getAllNodes(node, tagPath):
"""retrieve all nodes that match a given tag path.""" """retrieve all nodes that match a given tag path."""
tags = tagPath.split('/')
if len(tags) == 0: if len(tags) == 0:
return [] return []
@@ -109,8 +111,7 @@ class XmlFile(object):
def getAllNodes(self, tagPath): def getAllNodes(self, tagPath):
"""returns all nodes matching a given tag path.""" """returns all nodes matching a given tag path."""
self.verifyRootTag() self.verifyRootTag()
tags = tagPath.split('/') return getAllNodes(self.dom.documentElement, tagPath)
return getAllNodes(self.dom.documentElement, tags)
def getChildren(self, tagpath): def getChildren(self, tagpath):
""" returns the children of the given path""" """ returns the children of the given path"""