Get the sub-component with this name.
@param strName The name I'm looking for.
@param parent The container to start the search from.
@return The component with this name (or null).
761658
public Component getComponentByName(String strName, Container parent)
    {
        for (int i = 0; i < parent.getComponentCount(); i++)
        {
            Component component = parent.getComponent(i);
            if (strName.equals(component.getName()))
                return component;
            if (component instanceof Container)
            {
                component = this.getComponentByName(strName, (Container)component);
                if (component != null)
                    return component;
            }
        }
        return null;    // Not found
    }
1056225
public static String getChildText(Element parent, String childName) {
		Element child = getChild(parent, childName);
		if (child == null) return null;
		return getInnerText(child);
	}
1144617
public BaseCell parseSingleComponent(@Nullable Card parent, @Nullable O data, @Nullable Map<String, ComponentInfo> componentInfoMap) {
        return mDataParser.parseSingleComponent(data, parent, this, componentInfoMap);
    }
249941
protected Node getComponentByName(String name) throws QTasteException {
        mFoundComponent = null;
        mFindWithEqual = false;
        LOGGER.debug("try to find a component with the name : " + name);
        // TODO: Think about several component having the same names!
        for (Stage s : getStages()) {
            if (mFindWithEqual) {
                break;
            }
            if (!checkName(name, s.getScene().getRoot()) || !mFindWithEqual) {
                LOGGER.debug("parse window");
                lookForComponent(name, s.getScene().getRoot().getChildrenUnmodifiable());
            }
        }
        if (mFoundComponent != null) {
            //			Parent parent = mFoundComponent.getParent();
            //			//active the parent
            //			while ( parent != null && !(parent instanceof Window) )
            //			{
            //				parent = parent.getParent();
            //			}
            //			if ( parent != null )
            //				((Window)parent).toFront();

            return mFoundComponent;
        }
        throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
    }
891746
public static NamingContextable getParentNamingContext(final WComponent component) {
		if (component == null) {
			return null;
		}

		WComponent child = component;
		NamingContextable parent = null;
		while (true) {
			NamingContextable naming = WebUtilities.getAncestorOfClass(NamingContextable.class,
					child);
			if (naming == null) {
				break;
			}
			if (WebUtilities.isActiveNamingContext(naming)) {
				parent = naming;
				break;
			}
			child = naming;
		}

		return parent;
	}
943374
protected String getName(CmsObject cms, CmsResource resource, CmsUUID parentId) {

        return parentId == null ? resource.getRootPath() : resource.getName();
    }
665242
function getAncestorThemeName(component) {
  if (!component) {
    return null;
  }

  let name = component.mdTheme;

  if (!name && component.$options._componentTag === 'md-theme') {
    name = component.mdName;
  }

  return name || getAncestorThemeName(component.$parent);
}
88861
private static IIOMetadataNode getOrCreateChildNode(IIOMetadataNode parentNode, String name)
    {
        NodeList nodeList = parentNode.getElementsByTagName(name);
        if (nodeList.getLength() > 0)
        {
            return (IIOMetadataNode) nodeList.item(0);
        }
        IIOMetadataNode childNode = new IIOMetadataNode(name);
        parentNode.appendChild(childNode);
        return childNode;
    }
1011690
public static Component getRootParent(Component component)
	{
		while (null != component.getParent())
		{
			component = component.getParent();
		}
		return component;
	}
1240056
public Node parentNode() {

		if (currentNode == null)
			return null;

		Node node = getParentNode(currentNode);

		if (node != null)
			currentNode = node;

		return node;

	}
862960
public QName createQName(String strName)
   {
      String[] parts = strName.split(":");
      if (parts.length > 1)
         return new QName(getNamespaceURI(parts[0]), parts[1], parts[0]);
      else
         return new QName(parts[0]);
   }
210912
public UIComponent getNamingContainer() {
        UIComponent namingContainer = this;
        while (namingContainer != null) {
            if (namingContainer instanceof NamingContainer) {
                return namingContainer;
            }
            namingContainer = namingContainer.getParent();
        }
        return null;
    }
1128686
@Override
    public String getContainerClientId(FacesContext ctx)
    {
        if (isPrependId())
        {
            return super.getContainerClientId(ctx);
        }
        UIComponent parentNamingContainer = _ComponentUtils.findParentNamingContainer(this, false);
        if (parentNamingContainer != null)
        {
            return parentNamingContainer.getContainerClientId(ctx);
        }
        return null;
    }
429875
def _get_traversal_children(self, name):
        
        name = name.upper()
        parts = name.split('_')
        try:
            assert 3 <= len(parts) <= 4
            prefix = "{0}_{1}".format(parts[0], parts[1])
            component = int(parts[2])
            subcomponent = int(parts[3]) if len(parts) == 4 else None
        except (AssertionError, ValueError):
            return None, None
        else:
            if prefix != self.name:
                return None, None
        return component, subcomponent
12047
private Xpp3Dom getChild(Xpp3Dom parentNode, String name) {
		Xpp3Dom child = parentNode.getChild(name);
		if (child != null) {
			return child;
		}
		
		return parentNode.getChild(namespace + name);
	}
303836
private static function getStringElement(\DOMElement $parent, string $name) : ?string
    {
        $e = self::getStringElements($parent, $name);
        if (empty($e)) {
            return null;
        }
        if (count($e) > 1) {
            throw new \Exception('More than one '.$name.' in '.$parent->tagName);
        }

        return $e[0];
    }
237889
def getchild(self, name, parent):
        """"""
        log.debug('searching parent (%s) for (%s)', Repr(parent), name)
        if name.startswith('@'):
            return parent.get_attribute(name[1:])
        return parent.get_child(name)