src/Environaut/Config/Reader/Dom/DomElement.php
public function getChild($name)
    {
        $query = 'self::node()[count(child::*[local-name() = "%1$s" and namespace-uri() = "%2$s"]) = 1]/*' .
                '[local-name() = "%1$s" and namespace-uri() = "%2$s"]';

        $node = $this->ownerDocument->getXpath()->query(
            sprintf($query, $name, $this->ownerDocument->getDefaultNamespaceUri()),
            $this
        )->item(0);

        return $node;
    }
public function getChild($name)
    {
        $query = 'self::node()[count(child::*[local-name() = "%1$s" and namespace-uri() = "%2$s"]) = 1]/*' .
                '[local-name() = "%1$s" and namespace-uri() = "%2$s"]';

        $node = $this->ownerDocument->getXpath()->query(
            sprintf($query, $name, $this->ownerDocument->getDefaultNamespaceUri()),
            $this
        )->item(0);

        return $node;
    }
Returns first child of the element with the given name.

@param string $name name of element to get

@return \DOMNode first child node with the given name