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
def getAllNodes(node, tags):
def getAllNodes(node, tagPath):
"""retrieve all nodes that match a given tag path."""
tags = tagPath.split('/')
if len(tags) == 0:
return []
@@ -109,8 +111,7 @@ class XmlFile(object):
def getAllNodes(self, tagPath):
"""returns all nodes matching a given tag path."""
self.verifyRootTag()
tags = tagPath.split('/')
return getAllNodes(self.dom.documentElement, tags)
return getAllNodes(self.dom.documentElement, tagPath)
def getChildren(self, tagpath):
""" returns the children of the given path"""