getAllNodes doğrudan çağırıldığında liste almıyor.
This commit is contained in:
+4
-3
@@ -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"""
|
||||||
|
|||||||
Reference in New Issue
Block a user