src/dom/Dom.php
public static function getElementsByTagName($node, $tagName)
    {
        $ret = array();
        $nodes = $node->getElementsByTagName($tagName);
        foreach ($nodes as $node) {
            if ($node instanceof DOMElement) {
                array_push($ret, $node);
            }
        }
        return $ret;
    }
public static function getElementsByTagName($node, $tagName)
    {
        $ret = array();
        $nodes = $node->getElementsByTagName($tagName);
        foreach ($nodes as $node) {
            if ($node instanceof DOMElement) {
                array_push($ret, $node);
            }
        }
        return $ret;
    }
public static function getElementsByTagName ( $ node , $ tagName ) { $ ret = array ( ) ; $ nodes = $ node -> getElementsByTagName ( $ tagName ) ; foreach ( $ nodes as $ node ) { if ( $ node instanceof DOMElement ) { array_push ( $ ret , $ node ) ; } } return $ ret ; }
Gets elements by tagname.

This function returns all subnodes that have a given tagname.

@param DOMElement $node    DOMElement object
@param string     $tagName Tag name

@return array of DOMElement objects
Gets elements by tagname .