protected function nextTagName($node)
    {
        $nextNode = $node->nextSibling;
        while ($nextNode != null) {
            if ($nextNode instanceof DOMElement) {
                break;
            }
            $nextNode = $nextNode->nextSibling;
        }
        $nextTag = '';
        if ($nextNode instanceof DOMElement && $nextNode != null) {
            $nextTag = strtolower($nextNode->nodeName);
        }

        return $nextTag;
    }
protected function nextTagName($node)
    {
        $nextNode = $node->nextSibling;
        while ($nextNode != null) {
            if ($nextNode instanceof DOMElement) {
                break;
            }
            $nextNode = $nextNode->nextSibling;
        }
        $nextTag = '';
        if ($nextNode instanceof DOMElement && $nextNode != null) {
            $nextTag = strtolower($nextNode->nodeName);
        }

        return $nextTag;
    }
protected function nextTagName ( $ node ) { $ nextNode = $ node -> nextSibling ; while ( $ nextNode != null ) { if ( $ nextNode instanceof DOMElement ) { break ; } $ nextNode = $ nextNode -> nextSibling ; } $ nextTag = '' ; if ( $ nextNode instanceof DOMElement && $ nextNode != null ) { $ nextTag = strtolower ( $ nextNode -> nodeName ) ; } return $ nextTag ; }
Find the next sibling tag name for this node

@param  DOMNode $node DOM node
@return string        tag name
Find the next sibling tag name for this node