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

Method buildPath

suds/sax/element.py:65–81  ·  view source on GitHub ↗

Build the specifed pat as a/b/c where missing intermediate nodes are built automatically. @param parent: A parent element on which the path is built. @type parent: I{Element} @param path: A simple path separated by (/). @type path: basestring

(self, parent, path)

Source from the content-addressed store, hash-verified

63
64 @classmethod
65 def buildPath(self, parent, path):
66 """
67 Build the specifed pat as a/b/c where missing intermediate nodes are
68 built automatically.
69 @param parent: A parent element on which the path is built.
70 @type parent: I{Element}
71 @param path: A simple path separated by (/).
72 @type path: basestring
73 @return: The leaf node of I{path}.
74 @rtype: L{Element}
75 """
76 for tag in path.split('/'):
77 child = parent.getChild(tag)
78 if child is None:
79 child = Element(tag, parent)
80 parent = child
81 return child
82
83 def __init__(self, name, parent=None, ns=None):
84 """

Callers 1

build_schemaMethod · 0.80

Calls 3

getChildMethod · 0.80
ElementClass · 0.70
splitMethod · 0.45

Tested by

no test coverage detected