public function xpathOne($path)
    {
        $result = $this->xpath($path);
        if(is_array($result))
            return current($result);

        return $result;

    }
public function xpathOne($path)
    {
        $result = $this->xpath($path);
        if(is_array($result))
            return current($result);

        return $result;

    }
public function xpathOne ( $ path ) { $ result = $ this -> xpath ( $ path ) ; if ( is_array ( $ result ) ) return current ( $ result ) ; return $ result ; }
Query an xpath and return the first result

@param string $path The xpath query

@return SimpleXMLElement The matching result or FALSE
Query an xpath and return the first result