src/Danmichaelo/QuiteSimpleXMLElement/QuiteSimpleXMLElement.php
public function first($path)
    {
        // Convenience method
        $x = $this->xpath($path);

        return count($x) ? $x[0] : null;
    }
public function first($path)
    {
        // Convenience method
        $x = $this->xpath($path);

        return count($x) ? $x[0] : null;
    }
public function first ( $ path ) { // Convenience method $ x = $ this -> xpath ( $ path ) ; return count ( $ x ) ? $ x [ 0 ] : null ; }
Get the first node matching an XPath query, or null if no match.

@param string $path
@return QuiteSimpleXMLElement
Get the first node matching an XPath query or null if no match .