MCPcopy Index your code
hub / github.com/nodejs/node / get_elem_value

Function get_elem_value

deps/v8/third_party/abseil-cpp/absl/abseil.podspec.gen.py:64–76  ·  view source on GitHub ↗

Returns the value of XML element with the given name.

(elem, name)

Source from the content-addressed store, hash-verified

62
63
64def get_elem_value(elem, name):
65 """Returns the value of XML element with the given name."""
66 for child in elem:
67 if child.attrib.get("name") != name:
68 continue
69 if child.tag == "string":
70 return child.attrib.get("value")
71 if child.tag == "boolean":
72 return child.attrib.get("value") == "true"
73 if child.tag == "list":
74 return [nested_child.attrib.get("value") for nested_child in child]
75 raise "Cannot recognize tag: " + child.tag
76 return None
77
78
79def normalize_paths(paths):

Callers 1

parse_ruleFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected