MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / childrenAtPath

Method childrenAtPath

suds/sax/element.py:457–471  ·  view source on GitHub ↗

Get a list of children at I{path} where I{path} is a (/) separated list of element names that are expected to be children. @param path: A (/) separated list of element names. @type path: basestring @return: The collection leaf nodes at the end of I{path}

(self, path)

Source from the content-addressed store, hash-verified

455 return result
456
457 def childrenAtPath(self, path):
458 """
459 Get a list of children at I{path} where I{path} is a (/) separated
460 list of element names that are expected to be children.
461 @param path: A (/) separated list of element names.
462 @type path: basestring
463 @return: The collection leaf nodes at the end of I{path}
464 @rtype: [L{Element},...]
465 """
466 parts = [p for p in path.split('/') if len(p) > 0]
467 if len(parts) == 1:
468 result = self.getChildren(path)
469 else:
470 result = self.__childrenAtPath(parts)
471 return result
472
473 def getChildren(self, name=None, ns=None):
474 """

Callers

nothing calls this directly

Calls 3

getChildrenMethod · 0.95
__childrenAtPathMethod · 0.95
splitMethod · 0.45

Tested by

no test coverage detected