src/ParserTrait.php
public function xpath($path)
    {
        $xpath = new \DOMXPath($this->dom);

        $list = $xpath->query($path);

        $return = [];
        foreach ($list as $node) {
            $return[] = $this->newElement($node);
        }

        return $return;
    }
public function xpath($path)
    {
        $xpath = new \DOMXPath($this->dom);

        $list = $xpath->query($path);

        $return = [];
        foreach ($list as $node) {
            $return[] = $this->newElement($node);
        }

        return $return;
    }
public function xpath ( $ path ) { $ xpath = new \ DOMXPath ( $ this -> dom ) ; $ list = $ xpath -> query ( $ path ) ; $ return = [ ] ; foreach ( $ list as $ node ) { $ return [ ] = $ this -> newElement ( $ node ) ; } return $ return ; }
Get elements using an xpath selector.

@param string $path The xpath selector

@return Element[]
Get elements using an xpath selector .