public static function isXPath($locator)
    {
        $document = new \DOMDocument('1.0', 'UTF-8');
        $xpath = new \DOMXPath($document);
        return @$xpath->evaluate($locator, $document) !== false;
    }
public static function isXPath($locator)
    {
        $document = new \DOMDocument('1.0', 'UTF-8');
        $xpath = new \DOMXPath($document);
        return @$xpath->evaluate($locator, $document) !== false;
    }
public static function isXPath ( $ locator ) { $ document = new \ DOMDocument ( '1.0' , 'UTF-8' ) ; $ xpath = new \ DOMXPath ( $ document ) ; return @ $ xpath -> evaluate ( $ locator , $ document ) !== false ; }
Checks that locator is an XPath

```php
<?php
Locator::isXPath('#user .hello') => false
Locator::isXPath('body') => false
Locator::isXPath('//body/p/user') => true
```

@param $locator

@return bool
Checks that locator is an XPath