Internal: Get the first child of `parent` with `name`, and return the text of its children.
330795
function child_data(parent, name) {
  var node     = child_by_name(parent, name)
  if (!node) return "";
  var children = node.children;
  if (!children.length) return "";
  return children.join("");
}
1363518
def prev_sibling(self):
        
        if self.parent is None:
            return None

        # Can't use index(); we need to test by identity
        for i, child in enumerate(self.parent.children):
            if child is self:
                if i == 0:
                    return None
                return self.parent.children[i-1]
528855
function (name) {
        var children = this._children;
        for (var i = 0; i < children.length; i++) {
            var child = children[i];
            if (child.name === name) {
                return child;
            } else {
                var res = child.getDescendantByName(name);
                if (res) {
                    return res;
                }
            }
        }
    }
494904
public String getChildElementTextValue(Element parentElement, String elementName) {

        try {
            // get the first child element matching the specified name
            Element childElement = (Element)parentElement.selectNodes("./" + elementName).get(0);
            // return the value of the child element
            return childElement.getTextTrim();
        } catch (Exception e) {
            return null;
        }
    }
1030996
def get_parent(self, level=1):
        '''
        
        '''
        try:
            parent_path = self.path.get_parent(level)
        except ValueError: # abspath cannot get parent
            return None
        assert parent_path
        return DirectoryInfo(parent_path)
586391
private static Element getFirstChildElement(Node parent) {
		NodeList nodeList = parent.getChildNodes();
		for (int i = 0; i < nodeList.getLength(); i++) {
			Node node = nodeList.item(i);
			if (node instanceof Element) {
				return (Element) node;
			}
		}
		return null;
	}
829461
def get_first(self, name):
        
        for a in self.all_annotations:
            if a.name == name:
                return a
        return None
28865
def get_parent_data(tree, node, current):
        
        if not current:
            current = []

        parent = tree.parent(node.identifier)
        if parent.is_root():
            return current

        current.insert(0, (parent.tag, parent.data))
        return PlateManager.get_parent_data(tree, parent, current)
662133
public static Element getChildElementByName(Element parent, String name)
    {
        NodeList children = parent.getChildNodes();

        for(int i = 0; i < children.getLength(); i++) {
            Node node = children.item(i);
            if(node.getNodeType() == Node.ELEMENT_NODE) {
                Element element = (Element) node;
                if(element.getTagName().equals(name)) {
                    return element;
                }
            }
        }

        return null;
    }
1131844
def get_text(self, node):
        """"""
        try:
            return node.children[0].content or ""
        except (AttributeError, IndexError):
            return node.content or ""
869466
def parent(self, key):
        """"""
        parent_key = '.'.join(key.split('.')[:-1])
        if not parent_key:
            return None
        else:
            return self[parent_key]
1251255
def get_parent(self):
        """"""
        return None if self.zoom == 0 else self.tile_pyramid.tile(
            self.zoom - 1, self.row // 2, self.col // 2
        )
629036
function getChild(obj, name) {
  return _.find(obj.children, function(child) {
    return child.name == name;
  });
}
617473
def get_containing(self, name, depth = 0):
        """"""
        ctx_dict = object.__getattribute__(self, '__dict__')
        if name in ctx_dict:
            if depth <= 0:
                return self
            depth -= 1
        parent = ctx_dict.get('_parent')
        if parent is None:
            return None
        return parent.get_containing(name, depth = depth)
409209
public Iterable<DContact> queryByFirstName(Object parent, java.lang.String firstName) {
    return queryByField(parent, DContactMapper.Field.FIRSTNAME.getFieldName(), firstName);
  }
1047377
def get(cls, parent, name):
        """"""
        return cls.query.filter_by(parent=parent, name=name).one_or_none()
405452
function getElementText (parent, localName, ns) {
    var el = _getFirstChildNS(parent, localName, ns);
    if (el === undefined) return undefined;
    return el.textContent;
  }