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

innerXML() публичный Метод

This will return the children of the present match. For an example, see {@link innerHTML()}.
См. также: innerHTML()
См. также: innerXHTML()
С версии: 2.0
public innerXML ( ) : string
Результат string Returns a string of XHTML that represents the children of the present node.
    public function innerXML()
    {
        $length = $this->size();
        if ($length == 0) {
            return;
        }
        // Only return the first item -- that's what JQ does.
        $first = $this->getFirstMatch();
        // Catch cases where first item is not a legit DOM object.
        if (!$first instanceof \DOMNode) {
            return;
        } elseif (!$first->hasChildNodes()) {
            return '';
        }
        $buffer = '';
        foreach ($first->childNodes as $child) {
            $buffer .= $this->document->saveXML($child);
        }
        return $buffer;
    }