MCPcopy Create free account
hub / github.com/ActiveState/code / getChild

Method getChild

recipes/Python/577451_Easy_XML/recipe-577451.py:25–27  ·  view source on GitHub ↗

Returns the first child node having the specified tag.

(self, tag)

Source from the content-addressed store, hash-verified

23 return str(self.elem.attributes[name].value)
24
25 def getChild(self, tag):
26 """Returns the first child node having the specified tag."""
27 return XmlNode(self.elem.getElementsByTagName(tag)[0])
28
29 def getChildren(self, tag):
30 """Returns a list of child nodes having the specified tag."""

Callers

nothing calls this directly

Calls 1

XmlNodeClass · 0.70

Tested by

no test coverage detected