From a09109f02f05a7ef47bb2f65c6577c316ebce090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 20 Jun 2005 13:31:14 +0000 Subject: [PATCH] =?UTF-8?q?getAllNodes=20do=C4=9Frudan=20=C3=A7a=C4=9F?= =?UTF-8?q?=C4=B1r=C4=B1ld=C4=B1=C4=9F=C4=B1nda=20liste=20alm=C4=B1yor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/xmlfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pisi/xmlfile.py b/pisi/xmlfile.py index 5dbef393..29b6d1da 100644 --- a/pisi/xmlfile.py +++ b/pisi/xmlfile.py @@ -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"""