src/XML.php
protected static function DOMNodeChildCount(DOMNode $node)
    {
        $count = 0;

        if ($node->hasChildNodes()) {
            foreach ($node->childNodes as $child) {
                if ($child->nodeType == XML_ELEMENT_NODE) {
                    $count++;
                }
            }
        }

        return $count;
    }
protected static function DOMNodeChildCount(DOMNode $node)
    {
        $count = 0;

        if ($node->hasChildNodes()) {
            foreach ($node->childNodes as $child) {
                if ($child->nodeType == XML_ELEMENT_NODE) {
                    $count++;
                }
            }
        }

        return $count;
    }
protected static function DOMNodeChildCount ( DOMNode $ node ) { $ count = 0 ; if ( $ node -> hasChildNodes ( ) ) { foreach ( $ node -> childNodes as $ child ) { if ( $ child -> nodeType == XML_ELEMENT_NODE ) { $ count ++ ; } } } return $ count ; }
Count the children of a DOMNode

@static
@param   DOMNode $node
@return  int
Count the children of a DOMNode