src/wcmf/lib/util/DOMUtils.php
public static function getNextSiblingOfType(\DOMElement $element, $elementType) {
    $nextSibling = $element->nextSibling;
    while ($nextSibling && $nextSibling->nodeType != $elementType) {
      $nextSibling = $nextSibling->nextSibling;
    }
    return $nextSibling;
  }
public static function getNextSiblingOfType(\DOMElement $element, $elementType) {
    $nextSibling = $element->nextSibling;
    while ($nextSibling && $nextSibling->nodeType != $elementType) {
      $nextSibling = $nextSibling->nextSibling;
    }
    return $nextSibling;
  }
public static function getNextSiblingOfType ( \ DOMElement $ element , $ elementType ) { $ nextSibling = $ element -> nextSibling ; while ( $ nextSibling && $ nextSibling -> nodeType != $ elementType ) { $ nextSibling = $ nextSibling -> nextSibling ; } return $ nextSibling ; }
Get the next sibling of the given element type
@param $element Reference element
@param $elementType Element type (e.g. XML_ELEMENT_NODE)
@return \DomElement
Get the next sibling of the given element type