QueryPath\DOMQuery::isXMLish PHP Метод

isXMLish() защищенный Метод

Basically, this scans a portion of the supplied string, checking to see if it has a tag-like structure. It is possible to "confuse" this, which may subsequently result in parse errors, but in the vast majority of cases, this method serves as a valid inicator of whether or not the content looks like XML. Things that are intentional excluded: - plain text with no markup. - strings that look like filesystem paths. Subclasses SHOULD NOT OVERRIDE THIS. Altering it may be altering core assumptions about how things work. Instead, classes should override the constructor and pass in only one of the parsed types that this class expects.
protected isXMLish ( $string )
    protected function isXMLish($string)
    {
        return strpos($string, '<') !== false && strpos($string, '>') !== false;
    }