public function findNodesWithinPath($path, $nodeName)
    {
        $data = $this->getRawArray($path);

        if ($data === false) {
            return false;
        }

        $filteredData = [];
        foreach ($data as $nodeString => $children) {
            if ($this->getNodeName($nodeString) === $nodeName) {
                $filteredData[$nodeString] = $children;
            }
        }

        return $filteredData;
    }
public function findNodesWithinPath($path, $nodeName)
    {
        $data = $this->getRawArray($path);

        if ($data === false) {
            return false;
        }

        $filteredData = [];
        foreach ($data as $nodeString => $children) {
            if ($this->getNodeName($nodeString) === $nodeName) {
                $filteredData[$nodeString] = $children;
            }
        }

        return $filteredData;
    }
public function findNodesWithinPath ( $ path , $ nodeName ) { $ data = $ this -> getRawArray ( $ path ) ; if ( $ data === false ) { return false ; } $ filteredData = [ ] ; foreach ( $ data as $ nodeString => $ children ) { if ( $ this -> getNodeName ( $ nodeString ) === $ nodeName ) { $ filteredData [ $ nodeString ] = $ children ; } } return $ filteredData ; }
Returns all nodes with given name found within given path

@param string $path A path to search in
@param string $nodeName A name of the nodes to return
@return mixed String with desired element, or false on failure
Returns all nodes with given name found within given path